composer.json

Version numbers with caret and tilde in composer.json

穿精又带淫゛_ 提交于 2020-08-22 09:27:11
问题 I wonder what is the difference between caret and tilde in composer.json. Can I say it like this: caret (^) lock the first and the second version number (the 1.2 in 1.2.3) and tilde(~) lock only the first version number (the 1 in 1.2.3)? https://getcomposer.org/doc/articles/versions.md#next-significant-release-operators 回答1: From the documentation you linked: ~1.2 is equivalent to >=1.2 <2.0.0, while ~1.2.3 is equivalent to >=1.2.3 <1.3.0 ^1.2.3 is equivalent to >=1.2.3 <2.0.0 The tilde

Version numbers with caret and tilde in composer.json

≡放荡痞女 提交于 2020-08-22 09:25:12
问题 I wonder what is the difference between caret and tilde in composer.json. Can I say it like this: caret (^) lock the first and the second version number (the 1.2 in 1.2.3) and tilde(~) lock only the first version number (the 1 in 1.2.3)? https://getcomposer.org/doc/articles/versions.md#next-significant-release-operators 回答1: From the documentation you linked: ~1.2 is equivalent to >=1.2 <2.0.0, while ~1.2.3 is equivalent to >=1.2.3 <1.3.0 ^1.2.3 is equivalent to >=1.2.3 <2.0.0 The tilde

composer : is there a way to specify a preference order for package repositories?

旧城冷巷雨未停 提交于 2020-02-23 12:53:49
问题 I am working with a package vendorName/moduleName (a Magento extension) that is present on packagist and on firegento. On my composer.json file, I have : "require": { ...................., ..................., "vendorName/moduleName":"*" }, "repositories": [ ......................, ...................., { "type": "composer", "url": "https://packages.firegento.com" } ], As Composer is downloaded pre-configured to use packagist.org , the vendorName/moduleName is loaded from packagist . I would

composer : is there a way to specify a preference order for package repositories?

白昼怎懂夜的黑 提交于 2020-02-23 12:51:31
问题 I am working with a package vendorName/moduleName (a Magento extension) that is present on packagist and on firegento. On my composer.json file, I have : "require": { ...................., ..................., "vendorName/moduleName":"*" }, "repositories": [ ......................, ...................., { "type": "composer", "url": "https://packages.firegento.com" } ], As Composer is downloaded pre-configured to use packagist.org , the vendorName/moduleName is loaded from packagist . I would

Why using PSR4 autoload doesn't add any classes into classmap/namespaces file?

早过忘川 提交于 2020-01-14 03:16:28
问题 I've got the following composer.json file: { "require-dev": { "queueit/KnownUser.V3.PHP": "dev-master" }, "repositories": [ { "type": "package", "package": { "name": "queueit/KnownUser.V3.PHP", "version": "dev-master", "source": { "type": "git", "url": "https://github.com/kenorb-contrib/KnownUser.V3.PHP.git", "reference": "task/composer-autoloader" } } } ] } However upon running composer install , the namespaces or classes aren't added into autoload_classmap.php or autoload_namespaces.php in

ignore dev dependencies in php composer

99封情书 提交于 2019-12-12 17:01:41
问题 I have developed a composer laravel based project that I need to install on a remote production server. The problem is I have limited permission/ access so my option is to "archive" the package( using composer archive ) and unpack on the production. What folders do I need to archive and how can I ignore the dev dependencies of the package as well as vendor dev dependencies? 回答1: composer archive is likely not to help you, because this command creates an archive of a defined version of a

Why using PSR4 autoload doesn't add any classes into classmap/namespaces file?

早过忘川 提交于 2019-12-08 15:44:43
I've got the following composer.json file: { "require-dev": { "queueit/KnownUser.V3.PHP": "dev-master" }, "repositories": [ { "type": "package", "package": { "name": "queueit/KnownUser.V3.PHP", "version": "dev-master", "source": { "type": "git", "url": "https://github.com/kenorb-contrib/KnownUser.V3.PHP.git", "reference": "task/composer-autoloader" } } } ] } However upon running composer install , the namespaces or classes aren't added into autoload_classmap.php or autoload_namespaces.php in vendor/composer . Before that I've added into project's composer.json these lines: "autoload": { "psr-4