Require Composer v2.0? - package

Is there a way to require someone to have composer v2.0 installed, so that otherwise a project can't be build, when running "composer install"? I just find version requirements related to specific composer packages, but no way to require a certain version for composer itself, but maybe someone knows more about it?

You can use composer require composer-runtime-api:^2

Related

I want to use PayFort Sdk in react native with some libraries and getting error

I want to use PayFort in my React Native and luckily I found out two of these libraries 1 is RN-Payfort-SDK and the other one is react-native-payfort-sdk
and I am using it correctly but when I try to run the project both of the libraries throw me the same error
Could not find com.victor:lib:1.0.1.
Required by:project :app > project :react-native-payfort-sdk
After the error, I try to search a lot about this library and luckily found a problem that this library is not updated to mavenCenteral() as you all know jcenter() is not working anymore so the question is can someone help me regarding this library or any other method I'll be really thankful to you.
you can install react-native-payfort-sdk from my fork until this PR merge
just edit package.json
"react-native-payfort-sdk": "https://github.com/nomi9995/react-native-payfort-sdk#fix/victor-lib"
after adding this line, just do
yarn install or npm install
after installing node_modules, you should clear cache from the android studio like this
You can still use jcenter() to resolve the above old libary com.victor:lib:1.0.1 as JCenter is still readable for old versions. Your application will work unless there is a newer versions of a library that are not available on jcenter

How to install cinterop tool in Windows/Ubuntu

I am following this tutoriel to use C library in Kotlin (Android Studio) https://jonnyzzz.com/blog/2018/05/28/minimalistic-kn/ But I can’t find the how to install/download the cinterop tool both in Windows and Ubuntu I have the error “cinterop: command not found” ! Does anybody please knows how to install cinterop ? Thank you in advance
This tool is a part of the kotlin-native distribution, and it does not make any sense to use it without the Kotlin/Native compiler. So, in fact, you would like to get all the distribution here, and install it correctly.There are three main approaches to the Kotlin/Native installation. All of them are described in the documentation.
Installing it with the IntelliJ IDEA. You should just get an IDE and let it install everything on its own. It will download all tools and put them to the following location: ~/.konan/kotlin-native-prebuilt-<osName>-<kotlinVersion>/bin/. Then you will be able to add this folder to your PATH and call the tool from CLI.
Installing using the Gradle build system. Quite similar, but this one will require manual installation of the Gradle. The first run will also download all tools and pack them to the same location as in the IDE case.
Installing the CLI tool. This looks like the most appropriate way to follow the tutorial, but won't help a lot when you start working on more sophisticated projects. In general, you should just download the latest version of the Kotlin/Native, unpack it to some folder and add this folder to your PATH.

How to interpret suggestions when installing CakePHP via Composer?

When I try installing with command line:
composer self-update && composer create-project --prefer-dist cakephp/app my_app_name
I keep getting this message, which I didnt use to have, now which one is required, which one is not, do I have to download manually everytime?
cakephp/app suggests installing markstory/asset_compress (An asset compression plugin which provides file concatenation and a flexible filter system for preprocessing and minification.)
cakephp/app suggests installing dereuromark/cakephp-ide-helper (After baking your code, this keeps your annotations in sync with the code evolving from there on for maximum IDE and PHPStan compatibility.)
cakephp/app suggests installing phpunit/phpunit (Allows automated tests to be run without system-wide install.)
cakephp/cakephp suggests installing lib-ICU (The intl PHP library, to use Text::transliterate() or Text::slug())
symfony/console suggests installing symfony/event-dispatcher ()
symfony/console suggests installing symfony/lock ()
symfony/console suggests installing psr/log-implementation (For using the console logger)
m1/env suggests installing m1/vars (For loading of configs)
asm89/twig-cache-extension suggests installing psr/cache-implementation (To make use of PSR-6 cache implementation via PsrCacheAdapter.)
aptoma/twig-markdown suggests installing michelf/php-markdown (Original Markdown engine with MarkdownExtra.)
aptoma/twig-markdown suggests installing knplabs/github-api (Needed for using GitHub's Markdown engine provided through their API.)
ajgl/breakpoint-twig-extension suggests installing ext-xdebug (The Xdebug extension is required for the breakpoint to work)
ajgl/breakpoint-twig-extension suggests installing symfony/framework-bundle (The framework bundle to integrate the extension into Symfony)
ajgl/breakpoint-twig-extension suggests installing symfony/twig-bundle (The twig bundle to integrate the extension into Symfony)
psy/psysh suggests installing ext-pcntl (Enabling the PCNTL extension makes PsySH a lot happier :))
psy/psysh suggests installing ext-posix (If you have PCNTL, you'll want the POSIX extension as well.)
psy/psysh suggests installing ext-pdo-sqlite (The doc command requires SQLite to work.)
psy/psysh suggests installing hoa/console (A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit.)
These are only suggestions that may extend the functionality of already installed packages, but everything should work fine without them. For example monolog/monolog will suggest a couple of plugins that will allow logging into different backends. But monolog/monolog will work without them - you may not be able to log for example to Sentry, but monolog will still be usable without this feature.
So usually you can just ignore these suggestions. But you can take a few minutes to check what these suggested packages are actually doing - you can learn about new technologies and solutions that can make your app better and easier to maintain.
If you're really not interested in these suggestions, you can use --no-suggest switch to avoid displaying them on install/update/require:
composer install --no-suggest

configuration composer.json Symfony3 and sonataAdmin

I want to start a project with Symfony3 and SonataAdmin
I was trying a lot of versions of symfony and sonataAdminBundle
But I always get errors when updating composer
What's the correct composer.json to start my project
thanks
According to packagist the current v3.3.1 of SonataAdminBundle should be compatible with Symfony ^3.0.
You can just run composer require sonata-project/admin-bundle and it will automatically look for the newest compatible version. If that fails you could try allowing development-versions as well.
composer require sonata-project/admin-bundle:dev-master
That should be your last resort though as it pulls in an unstable dependency. Feel free to add composer's error to your question and maybe I or someone else can give a more precise answer.

Combine Debian packages with libraries installed from source

On my linux (Ubuntu 11.04) development machine. I often need to install libraries from source. This always causes problems for me because the package manager doesn't consider packages installed from source when it checks dependencies. This makes the package manager worthless to me since once I install one set of libs from source (especially if they are vital to the gnome environment i.e. gstreamer), I can never use it again without screwing up my entire distro with mixed dependencies. It seems to me that it would be relatively simple to check the dependencies with pkg-config without having to worry with the deb database. I don't mind writing a little code here. Does anyone have any ideas?
Alternatively, you should look into the equivs package, which is made exactly for the purpose of creating empty .debs that will make apt/dpkg think a certain package is installed when it isn't.
Grab the source package from Debian unstable and build a .deb from that using the developer tools. If you need an even newer upstream version, you can apply the .diff.gz part of the Debian source to an upstream tarball and get a build infrastructure that has good chances of working. If if doesn't, I'm sure the package maintainer would appreciate patches to make it work with the new upstream version.
Another option would be checkinstall. It creates a .deb package containing dependency information, but also you will be able to uninstall it via package management.

Resources