Refactored the code in `src/Configuration` to include type declarations
for method arguments and returned values.
To make it easier to track what's left to do and to have a tool that
prevents "regressions" in the future, PHP_CodeSniffer and Slevomat
Coding Standard have been added.
Next, a `phpcs.xml.dist` file has been created and configured to
enforce type hints for methods. For the time being, only files in
the src/Configuration directory are now being watched.
To make it simpler to execute the checks, `lint` script has been
added to `composer.json` to allow running checks with `composer lint`.
The `within()` function has been modified to pass-through the
return value of the callback function.
It is now possible to write code like:
```php
$out = within('/foo', function () {
return 'bar';
});
```
The `$out` variable will now contain the value `'bar'`.
If the callback function returns nothing, then the return of
`within()` call will be `null`.
Fixes#2178
The unit tests would fail, when started on a non-master branch.
This was happening because the test repository has been initialized
with git default branch, whereas deploy configuration expects to
work with current git branch.
This has been fixed by adding `git checkout -B BRANCH_NAME`, right after
test repo initialization to the DeployTest setup procedure, to make sure
that the test repositoryis always in sync repo-wise with the Deployer
repository.
Fixes#2181
Reworked the `deploy:check_remote` step, to use the `on(localhost(), ...)`,
instead of relying on `runLocally`.
This has been changed, to make sure that the all functions that
are being executed and are related to "local" part of the logic,
are ran on the local host.
Previously in `runLocally(sprintf("%s ls-remote $opt $repository $ref", get('bin/git')));`
the `get('bin/git')` would've been executed on the remote host, which
could have resulted in an unexpected behaviour.
By closing all of the instructions, in the closure that is executed
by the `on()` function, we are sure that the context is set to the
right host.
Do not update upgradeable plugins, it updates code too. What we actually want is to run the migration. But the database:migrate --all command only runs the migrations for the core. Added a task that runs migrations for all plugins too.
Added || true to not let it fail on non-existing database migrations. This can be removed when this commit is released; 2a8a76fd83
* Update shopware6.php
I'm not sure wether this is interesting for your @peterjaap I hacked a script with the horrible table output to install, upgrade and activate all plugins
* Update shopware6.php
made it a static function