Comments (20)
We should run the Incenteev
script handler at the end (or our handlers first).
from standard-edition.
I tried a few different orders, but it´s still not working.
If parameters.yml
does not exist when Contao\CoreBundle\Composer\ScriptHandler::addDirectories
is called, it will throw an Exception as well.
I think this happens because Contao\CoreBundle\Command\InstallCommand
is a ContainerAwareCommand
and uses parameters. So at this point Symfony will load config.yml
which tries to import the non existing parameters.yml
on top.
from standard-edition.
I have adjusted the order of the Composer script handlers in e8e64c1. Together with contao/core-bundle@f02f9ac this should solve the issue. Can you please confirm?
from standard-edition.
Looks like the ContainerAwareCommand
wasn´t the problem. There is still a RuntimeException
.
composer create-project contao/standard-edition contao4 @dev -vvv
[RuntimeException]
An error occurred while executing the contao:install command.
Exception trace:
() at /private/var/www/d.tomasi/contao4/vendor/contao/core-bundle/src/Composer/ScriptHandler.php:64
Contao\CoreBundle\Composer\ScriptHandler::executeCommand() at /private/var/www/d.tomasi/contao4/vendor/contao/core-bundle/src/Composer/ScriptHandler.php:31
Contao\CoreBundle\Composer\ScriptHandler::addDirectories() at phar:///private/var/www/d.tomasi/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:198
Composer\EventDispatcher\EventDispatcher->executeEventPhpScript() at phar:///private/var/www/d.tomasi/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:166
Composer\EventDispatcher\EventDispatcher->doDispatch() at phar:///private/var/www/d.tomasi/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:91
Composer\EventDispatcher\EventDispatcher->dispatchScript() at phar:///private/var/www/d.tomasi/composer.phar/src/Composer/Installer.php:336
Composer\Installer->run() at phar:///private/var/www/d.tomasi/composer.phar/src/Composer/Command/CreateProjectCommand.php:173
Composer\Command\CreateProjectCommand->installProject() at phar:///private/var/www/d.tomasi/composer.phar/src/Composer/Command/CreateProjectCommand.php:131
Composer\Command\CreateProjectCommand->execute() at phar:///private/var/www/d.tomasi/composer.phar/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:253
Symfony\Component\Console\Command\Command->run() at phar:///private/var/www/d.tomasi/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:874
Symfony\Component\Console\Application->doRunCommand() at phar:///private/var/www/d.tomasi/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:195
Symfony\Component\Console\Application->doRun() at phar:///private/var/www/d.tomasi/composer.phar/src/Composer/Console/Application.php:147
Composer\Console\Application->doRun() at phar:///private/var/www/d.tomasi/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:126
Symfony\Component\Console\Application->run() at phar:///private/var/www/d.tomasi/composer.phar/src/Composer/Console/Application.php:84
Composer\Console\Application->run() at phar:///private/var/www/d.tomasi/composer.phar/bin/composer:43
require() at /private/var/www/d.tomasi/composer.phar:25
from standard-edition.
I found the problem: the console commands are initializing the Contao 3 framework and the Contao 3 framework triggers the Automator::generateSymlinks()
method. I will remove this call from the listener.
@contao/developers Do we really want to initialize the Contao 3 framework on the console?
from standard-edition.
Changed in b0f82c6. @dtomasi Please wait a few minutes until packagist has updated its cache and then try again. Thanks for your help.
from standard-edition.
+1 This works perfectly! Thank you!
from standard-edition.
I thought we do need the framework for our Automator tasks?
from standard-edition.
@aschempp Actually we should be able to decide on a per command basis. Similar to extending ContainerAware
there should be a FrameworkDependendCommand
or something alike.
from standard-edition.
I agree, we should limit the initialization to commands that need the framework.
But please not by extending a command class but by implementing an interface.
from standard-edition.
But how is the event listener supposed to know about it?
from standard-edition.
Maybe this could be done by ConsoleEvents::COMMAND
.
with something like this:
use Symfony\Component\Console\Event\ConsoleCommandEvent;
use Symfony\Component\Console\ConsoleEvents;
public function isFrameworkDependendCommand(ConsoleCommandEvent $event) {
$ref = new ReflectionClass($event->getCommand());
if ($ref->implementsInterface('FrameworkDependentCommand')) {
// Initialize Framework and maybe inject it
}
}
PS.: @leofeyer nice pic ;-)
from standard-edition.
see: https://github.com/ContaoBlackforest/core-bundle/commit/5456510d8e94b88f1c4605b7d3c47f64a97d6d1f
from standard-edition.
As discussed on Mumble on March, 26th:
- The interface should be called
Contao\Command\ContaoFrameworkDependentInterface
. - Discuss the comments in your PR (ContaoBlackforest/core-bundle@5456510d8e94b88f1c4605b7d3c47f64a97d6d1f)
- We need to add a
$this->booted
so the Contao framework is not booted twice.
from standard-edition.
The interface should be called Contao\Command\ContaoFrameworkDependentInterface.
Isn´t it Contao\CoreBundle\Command\ContaoFrameworkDependentInterface
?
from standard-edition.
Isn´t it Contao\CoreBundle\Command\ContaoFrameworkDependentInterface?
Of course :)
from standard-edition.
Whats about the $this->booted
? Should we create a static privat $isBooted
?
from standard-edition.
Whats about the $this->booted? Should we create a static privat $isBooted?
Yeah but @leofeyer will do :P
from standard-edition.
Ok, should I do a PR of the current state??
from standard-edition.
Closed in favor of the PR (contao/core-bundle#159). @dtomasi Thanks a lot for your help :)
from standard-edition.
Related Issues (20)
- Change /web to /public_html HOT 1
- Wartungsmodus nicht möglich HOT 6
- Unable to login when behind a SSL Proxy HOT 7
- Add basic security HOT 20
- Do not ship a default .htaccess file HOT 14
- Fehler beim Aufruf der Install.php - 4.3.6 HOT 4
- Manger Bundle in composer.json HOT 7
- Speichern und zurück funktioniert nicht mehr HOT 3
- swiftmailer requirement HOT 10
- Breaking change in Symfony Filesystem HOT 2
- Safari kann die Seite nicht öffnen, da die Netzwerkverbindung unterbrochen wurde HOT 7
- Fehler nach Installation unter XAMPP HOT 3
- Attempted to load class \"Config\" from the global namespace. HOT 25
- Unification of contao parameters HOT 1
- Alias Generierung HOT 1
- pages can not be selected in the pagebrowser. Radio buttons are missing. HOT 1
- cacheWarmup for "setup-scripts" HOT 5
- Maintenance "Recreate the symlinks" fails HOT 1
- Unattended Install HOT 8
- cacheWarmup differences between managed-edition? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from standard-edition.