- 🇵🇱 I live in Gdansk, Poland
- 🤖 I'm backend engineer/DevOps
- 💻 Most of the time I'm writing on Python and PHP
- 📧 Shoot me at [email protected]
My CV: https://vkrasnoperov.me
Scripts-dev directive for composer
License: MIT License
My CV: https://vkrasnoperov.me
Hi! i've found some bug
Composer2 snapshot and composer 2.0.4 at least
Installing neronmoon/scriptsdev (v0.1.8): Extracting archive
PHP Fatal error: Uncaught Error: Call to undefined method Composer\Package\RootAliasPackage::setScripts() in vendor/neronmoon/scriptsdev/src/Plugin.php:26
Full stack trace
Installing neronmoon/scriptsdev (v0.1.8): Extracting archive
PHP Fatal error: Uncaught Error: Call to undefined method Composer\Package\RootAliasPackage::setScripts() in my_project/vendor/neronmoon/scriptsdev/src/Plugin.php:26
Full stack trace:
#0 phar:///....composer.phar/src/Composer/Plugin/PluginManager.php(319): ScriptsDev\Plugin->activate(Object(Composer\Composer), Object(Composer\IO\ConsoleIO))
#1 phar:///.../composer.phar/src/Composer/Plugin/PluginManager.php(223): Composer\Plugin\PluginManager->addPlugin(Object(ScriptsDev\Plugin), false)
#2 phar:///.../composer.phar/src/Composer/Installer/PluginInstaller.php(76): Composer\Plugin\PluginManager->registerPackage(Object(Composer\Package\CompletePackage), true)
#3 [internal function]: Composer\Installer\PluginInstaller->Composer\Installer\{closure}(NULL)
#4 phar:///.../composer.phar/vendor/react/promise/src/React/Promise/FulfilledPromise.php(20): call_user_func(Object(Closure), NULL)
#5 phar:///.../composer.phar/vendor/react/promise/src in my_project/vendor/neronmoon/scriptsdev/src/Plugin.php on line 26
Fatal error: Uncaught Error: Call to undefined method Composer\Package\RootAliasPackage::setScripts() in my_project/vendor/neronmoon/scriptsdev/src/Plugin.php:26
Stack trace:
#0 phar:///.../composer.phar/src/Composer/Plugin/PluginManager.php(319): ScriptsDev\Plugin->activate(Object(Composer\Composer), Object(Composer\IO\ConsoleIO))
#1 phar:///.../composer.phar/src/Composer/Plugin/PluginManager.php(223): Composer\Plugin\PluginManager->addPlugin(Object(ScriptsDev\Plugin), false)
#2 phar:///.../composer.phar/src/Composer/Installer/PluginInstaller.php(76): Composer\Plugin\PluginManager->registerPackage(Object(Composer\Package\CompletePackage), true)
#3 [internal function]: Composer\Installer\PluginInstaller->Composer\Installer\{closure}(NULL)
#4 phar:///.../composer.phar/vendor/react/promise/src/React/Promise/FulfilledPromise.php(20): call_user_func(Object(Closure), NULL)
#5 phar:///.../composer.phar/vendor/react/promise/src in my_project/vendor/neronmoon/scriptsdev/src/Plugin.php on line 26
Hi! Thanks again for this very useful composer plugin!
But i have an other one question (problem?): Lately composer got nice feature "scripts-descriptions" but i found that composer validate
fires warning on scripts related to dev env
{
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
},
"scripts-dev": {
"dev-script": [
"@composer update --no-scripts nothing",
"@composer check-platform-reqs",
"@composer validate --strict"
]
}
},
"scripts-descriptions": {
"dev-script": "Do dev stuff"
}
}
and i wonder does this behavior depends on scriptdev plugin only or not not at all ? Or partly ?
#̶#̶#̶ ̶S̶t̶r̶a̶n̶g̶e̶ ̶b̶e̶h̶a̶v̶i̶o̶u̶r̶ ̶w̶i̶t̶h̶ ̶legacy-with-run-scripts-dev
t̶e̶s̶t̶: PR #15
legacy-with-run-scripts-dev [['composer', 'update'], ['composer', '--no-dev', 'run-script', 'test']]
o̶u̶t̶p̶u̶t̶s̶:̶
Exception: EXPECTED
"SCRIPTSDEV RULEZ"
BUT FOUND
"SCRIPTSDEV RULEZ"
extra-with-custom-script-run-script-dev
test: PR #15Testing: extra-with-custom-script-run-script-dev [['composer', 'update'], ['composer', 'test']]
---------------------- outputs ---------------------
Exception: EXPECTED
"SCRIPTSDEV RULEZ"
BUT FOUND
""
-͌͌͌͌͌͌͌͌͌͌-͌͌͌͌͌͌͌͌͌͌-͌͌͌͌͌͌͌͌͌͌-͌͌͌͌͌͌͌͌͌͌-͌͌͌͌͌͌͌͌͌͌-͌͌͌͌͌͌͌͌͌͌-͌͌͌͌͌͌͌͌͌͌-͌͌͌͌͌͌͌͌͌͌-͌͌͌͌͌͌͌͌͌͌-͌͌͌͌͌͌͌͌͌͌-͌͌͌͌͌͌͌͌͌͌-͌͌͌͌͌͌͌͌͌͌-͌͌͌͌͌͌͌͌͌͌-͌͌͌͌͌͌͌͌͌͌-͌͌͌͌͌͌͌͌͌͌-͌͌͌͌͌͌͌͌͌͌-͌͌͌͌͌͌͌͌͌͌-͌͌͌͌͌͌͌͌͌͌-͌͌͌͌͌͌͌͌͌͌͌-͌͌͌͌͌͌͌͌͌͌-͌͌͌͌͌͌͌͌͌͌-͌͌͌͌͌͌͌͌͌͌-͌͌͌͌͌͌͌͌͌͌-͌͌͌͌͌͌͌͌͌͌-͌͌͌͌͌͌͌͌͌͌͌-͌͌͌͌͌͌͌͌͌͌-͌͌͌͌͌͌͌͌͌͌-͌͌͌͌͌͌͌͌͌͌-͌͌͌͌͌͌͌͌͌͌͌͌-͌
I seems its working with post-install-cmd
or post-update-cmd
commands but with the test
command? Maybe composer/composer#4542 can help somehow?
Hey,
I'm relieved to see this repository is still getting some attention. I've been using this package for a couple of years now and enjoying it's functionality each day.
This opened issue is merely as a bit of a heads up and a place for other users of this package to check support/progress :)
Are you planning on integrating support for composer 2.0 which is expected to be released somewhere in June?
I just ran composer update
after updating to composer 2 and was greeted with the following:
neronmoon/scriptsdev v0.1.6 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
Background info:
https://github.com/composer/composer/blob/master/CHANGELOG.md
https://github.com/composer/composer/blob/master/UPGRADE-2.0.md
Regards,
Levi
Please consider moving the scripts-dev
section into extra
to avoid $ composer validate
complaining it is not defined and the definition does not allow additional properties.
$ composer validate
./composer.json is valid for simple usage with composer but has
strict errors that make it unable to be published as a package:
See https://getcomposer.org/doc/04-schema.md for details on the schema
The property scripts-dev is not defined and the definition does not allow additional properties
Besides, phpstorm also flags the scripts-dev
section as an error.
composer version 1.8.4 and some prior to this one
stack trace
- Installing neronmoon/scriptsdev (v0.1.4): Loading from cache
Extracting archivePHP Fatal error: Uncaught TypeError: Argument 1 passed to ScriptsDev\PackageScriptsExtractor::extract() must be an instance of Composer\Package\Package, instance of Composer\Package\RootAliasPackage given, called in ... vendor/neronmoon/scriptsdev/src/Plugin.php on line 24 and defined in ... vendor/neronmoon/scriptsdev/src/PackageScriptsExtractor.php:29
Stack trace:
#0 vendor/neronmoon/scriptsdev/src/Plugin.php(24): ScriptsDev\PackageScriptsExtractor->extract(Object(Composer\Package\RootAliasPackage))
#1 composer.phar/src/Composer/Plugin/PluginManager.php(236): ScriptsDev\Plugin->activate(Object(Composer\Composer), Object(Composer\IO\ConsoleIO))
#2 composer.phar/src/Composer/Plugin/PluginManager.php(205): Composer\Plugin\PluginManager->addPlugin(Object(ScriptsDev\Plugin))
#3 composer.phar/src/Compo in vendor/neronmoon/scriptsdev/src/PackageScriptsExtractor.php on line 29
Fatal error: Uncaught TypeError: Argument 1 passed to ScriptsDev\PackageScriptsExtractor::extract() must be an instance of Composer\Package\Package, instance of Composer\Package\RootAliasPackage given, called in vendor/neronmoon/scriptsdev/src/Plugin.php on line 24 and defined in vendor/neronmoon/scriptsdev/src/PackageScriptsExtractor.php:29
Stack trace:
#0 vendor/neronmoon/scriptsdev/src/Plugin.php(24): ScriptsDev\PackageScriptsExtractor->extract(Object(Composer\Package\RootAliasPackage))
#1 composer.phar/src/Composer/Plugin/PluginManager.php(236): ScriptsDev\Plugin->activate(Object(Composer\Composer), Object(Composer\IO\ConsoleIO))
#2 composer.phar/src/Composer/Plugin/PluginManager.php(205): Composer\Plugin\PluginManager->addPlugin(Object(ScriptsDev\Plugin))
#3 composer.phar/src/Compo in vendor/neronmoon/scriptsdev/src/PackageScriptsExtractor.php on line 29
version 0.1.3 is OK
also updating from 0.1.3 to 0.1.4 is OK
This composer plugin is very useful and works well, but we need a stable version to manage this package properly in composer
Can you publish a release please?
Packagist is out of date, dev-master is not up to date and 0.1.3 is not there.
Hi! Is it possible to add short syntax support for composer scriptdev commands?
For now it looks like this
composer --dev run-script my-script-dev-command
and short syntax is
composer --dev my-script-dev-command
non-dev (basically composer scripts) available just like short syntax above so it will be more usefull to add short syntax for dev scripts
honestly i dont know composer that well to find out where this support suppose to be added. Maybe in composer plugins. If so let me know. Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.