113 Commits

Author SHA1 Message Date
Anton Medvedev
439669f4aa Update symfony/console to ^5.4.9 2023-01-09 10:04:17 +01:00
Benoît Chantre
93c6dd585b
Remove platform from Composer config (#3044)
Don't fake the PHP version available from the environment.

Closes #2927.
2022-03-15 22:11:27 +01:00
Anton Medvedev
7360569cbf Fix code style 2022-03-13 00:41:32 +01:00
Mathieu I
9fbb270d99
Fix phpcs update (#3032)
* Bump slevomat/coding-standard from 6.4.1 to 7.0.19

Bumps [slevomat/coding-standard](https://github.com/slevomat/coding-standard) from 6.4.1 to 7.0.19.
- [Release notes](https://github.com/slevomat/coding-standard/releases)
- [Commits](https://github.com/slevomat/coding-standard/compare/6.4.1...7.0.19)

---
updated-dependencies:
- dependency-name: slevomat/coding-standard
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* style: fix all errors reported by phpcs

* style: remove typehints incompatible with php 7

* chore: update phpcs config

* chore: add missing docblocks

* style: remove useless ignore statements

* fix: remove extra mixed typehints

* fix: update api.md

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mathieu Imbert <mathieu.imbert@tracktik.com>
2022-03-13 00:28:16 +01:00
Mathieu I
c3d236a81f
Fix phpstan issues (#3001)
* Bump phpstan version to support php 8.1

* Fix some minor issues reported by phpstan

* Invert the elseif condition to check the most specific first

Co-authored-by: Mathieu Imbert <mathieu.imbert@tracktik.com>
2022-03-04 23:42:25 +01:00
Anton Medvedev
073929662d composer update 2022-01-11 19:56:59 +01:00
Anton Medvedev
af780b3631 Update composer deps 2021-11-03 16:09:45 +01:00
Anton Medvedev
8c3fbec817 Config composer platform to php7.3 2021-10-22 23:41:48 +02:00
Anton Medvedev
b7226c5415 Use schema.json to validate yaml recipes 2021-10-22 23:18:58 +02:00
Anton Medvedev
35a442f532 Refactor release process 2021-10-21 21:14:30 +02:00
Anton Medvedev
c5e72013b3 Update deps 2021-10-21 21:11:52 +02:00
Anton Medvedev
ca3991c49a Remove patreon 2021-09-24 00:33:05 +02:00
Anton Medvedev
b2e9ca9422 Add php requirement to composer.json 2021-09-24 00:07:16 +02:00
Sacharski Bartłomiej
d3b6eaf9fe
Added support for code coverage in E2E tests (#2533)
The E2E docker-compose stack has been modified to include code
coverage for all scripts that are kept in /project and are not
in the exclusion list.

The start command for `deployer` container has been replaced
with a `start-e2e-test.sh` script, which will execute E2E tests,
generate a Clover report and then return the exit code of E2E test
process to make sure that CI is aware of the test result.

Whole idea for collecting E2E coverage has been inspired by the
[this][1] article. All of scripts in `deployer` container will
now start with additional wrapper-like PHP code, which checks
if the `PHP_CCOV_START_FILE` variable is present. If not,
then nothing happens, but if the variable points to a PHP file,
then that file is being included.

The `docker-compose.yml` file has `PHP_CCOV_START_FILE` configured
to point to a file, which sets up code coverage, that starts counting
which instructions in `/project` directory have been called. Once
`php` interpreter starts shutting down, the coverage report is being
dumped into temporary files.

Once all tests have been processed, a script for merging partial
coverage reports is executed and finally a Clover code coverage file
is stored in the path defined in the `PHP_CCOV_OUTPUT_FILE` env var.

[1]: https://tarunlalwani.com/post/php-code-coverage-web-selenium/
2021-05-02 15:15:19 +02:00
Anton Medvedev
b1f33b1734
Refactor shell arguments escaping (#2458)
Now, it should not matter what default shell is used on a server: zsh, fish. 
Deployer will automatically switch to bash (or to a user-specified shell).

Laso added a release verification task.
2021-03-13 23:50:38 +03:00
Anton Medvedev
387b4c1d51
Update composer dependencies (#2453)
As well rename test dir to tests, as Pest does not support dir without s on the end.
Also, remove PHP requirement from composer.json as we already have check-in bin/dep and it's better to have the check only in one place (now they already out of sync).
2021-03-12 13:56:16 +03:00
Fabian Blechschmidt
f5c9a92b1d
Feature/2423 shopware order modules (#2425)
* #2423 shopware: task sw:plugin:activate:all runs migration script in wrong order

- add dependency for polyfill (to use str_ends_with)
- marcj/topsort (for sorting the shopware modules)

* #2423 shopware: task sw:plugin:activate:all runs migration script in wrong order

- get the plugin list
- read the composer names and dependencies from composer.lock
- order by dependencies
- use sorted list for activation and migration

* #2423 shopware: task sw:plugin:activate:all runs migration script in wrong order

Update changelog

* #2423 shopware: task sw:plugin:activate:all runs migration script in wrong order

do not update doc, but remove require autoload.php
2021-02-23 08:50:46 +01:00
Anton Medvedev
12b99c6d0a Add Pimple as a component 2020-11-20 22:54:08 +01:00
Anton Medvedev
80f382772d Add php requirement 2020-11-20 22:31:01 +01:00
Anton Medvedev
25aabfdfda Remove php requirement 2020-11-20 22:10:13 +01:00
Anton Medvedev
bb85e2f532 Add phpcs action 2020-11-17 22:59:18 +01:00
Markus Staab
55177c5b18
Fix fail() signature (#2261)
* added phpstan callable types

* Update src/Task/Task.php

* regenerated docs

* Update CHANGELOG.md

* update phpstan

* Restore Collection.php

* Restore Master.php

* Restore helpers.php

* Restore Task.php

* Update functions.php

* Update functions.php

* Update CHANGELOG.md

* regenerate docs
2020-11-02 12:13:57 +01:00
Markus Staab
de0813a5f9
fix phpstan level 1 warnings (#2230)
* fix phpstan level 1 warnings

* Update CHANGELOG.md

* composer update
2020-10-26 17:36:53 +01:00
Anton Medvedev
007b0db40f Add funding 2020-10-25 09:51:47 +01:00
Anton Medvedev
90ae26b5d8 Clean up configs 2020-10-25 09:46:47 +01:00
Markus Staab
7bb908608f
Add phpstan (#2218)
* added phpstan static analysis via GitHub Actions

* Update CHANGELOG.md

* fix bad merge

* Update phpstan.yml

Co-authored-by: Anton Medvedev <anton@medv.io>
2020-10-25 11:21:07 +03:00
Sacharski Bartłomiej
67ed1a800b
[#2197] Created E2E testing environment (#2198)
* [#2197] Created E2E testing environment

Created docker-based end-to-end testing environment, which allows
for testing more complex scenarios.

Additionally added FunctionE2ETest class that contains test scenario
for `run` function with placeholders.

Closes #2197

* [#2197] Moved docker to test dir & separated e2e tests from unit-tests

The docker directory has been moved into test/ directory.
Additionally the e2e tests have been separated from the unit-test
files:
  * AbstractE2ETest class is directly inheriting from TestCase,
    dropping relation to the AbstractTest
  * Separate bootstrap.php file for e2e test was created
  * Separate phpunit-e2e.xml.dist file was created to configure
    PHPUnit for just the e2e tests
  * deployer docker service now runs only e2e tests by default

* [#2197] Added E2E tests to GH actions

Added E2E tests steps to GH actions:
* building the docker-compose stack (building images)
* starting the stack to run the tests

If E2E tests fail, then docker-compose up will end with non-zero
exit code, thus the workflow will be marked as failed.

* [#2197] Fixed no output when using run() with sudo

Fixed a discrepancy in the `run()` function, where there would be
no output when the command was being executed with a sudo.

* [#2197] Added testcases for running commands with sudo

Added two testcases for e2e tests, that verify:
* that sudo command can be ran with password provided interactively
* that sudo command can be ran with password passed via argument

To allow for these tests to happen, the Dockerfile for server
service had to be modified - the deployer user will require a
password, when running command with sudo.

* [#2197] Added Laravel-boilerplate deploy E2E test

Added a very simple E2E test that checks whether the Laravel-boilerplate
deploys successfully to the testing server.

The testing scenario will deploy the app, copy sample .env file,
generate the app key and finally try to get the main page contents
to verify that the expected string is visible in the page source.

* [#2197] Moved E2E tests to separate job

Moved E2E tests to separate job and added docker-compose cache
to slightly improve stack build times.

* [#2197] Using deployphp test-laravel repo for E2E tests

Updated the laravel-boilerplate deploy config to use the repository
that belongs to deployphp organization.

Co-authored-by: Bartlomiej Sacharski <beton@cementowina.org>
2020-10-19 23:38:15 +03:00
Anton Medvedev
54748566a9 Improve tests 2020-10-09 00:15:28 +02:00
Sacharski Bartłomiej
89bde7059c
[issue-2187] Type declarations for src/Configuration (#2188)
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`.
2020-10-07 20:48:33 +02:00
Anton Medvedev
8293eb931e wip 2020-07-26 22:35:08 +03:00
Anton Medvedev
29a643b623 v7 2020-05-16 18:02:17 +03:00
Anton Medvedev
513d456bdf Migrate to PHP 7.2.25 2019-12-15 21:31:12 +07:00
Anton Medvedev
31f7346630 Return php platform version 2019-12-15 21:28:07 +07:00
Anton Medvedev
86c7b3848f Fix incompatibility with Symfony 5 2019-12-15 21:11:39 +07:00
Anton Medvedev
9fd858fbd6 Release v6.7.0 2019-12-14 17:38:03 +07:00
Ganon
9ce3f79c2f Add Symfony 5 support (#1956) 2019-12-06 15:55:19 +07:00
Anton Medvedev
99423f0b6e Fix build script and update composer 2018-04-20 19:23:19 +07:00
Anton Medvedev
49671e1c11 Update deployer/phar-update version 2018-02-28 00:36:35 +07:00
Anton Medvedev
ab8a2c49e7 Update composer 2018-02-27 23:34:53 +07:00
xakzona
5f2659a0f0 Update symfony package dependencies to 4.0 (#1559)
* Update symfony package dependencies to 4.0

* Update changelog

* Update changelog 2
2018-02-27 23:25:32 +07:00
Dariusz Rumiński
192078a540 Upgrade PHPUnit (#1417)
* Upgrade PHPUnit

* Update ScriptManagerTest.php

* Update InitializerTest.php

* Update GroupTaskTest.php

* Update HostSelectorTest.php

* Update DeployerTest.php
2018-01-02 18:13:28 +07:00
Anton Medvedev
a22faa6806 Add platform config 2017-12-22 15:28:40 +07:00
Anton Medvedev
7a1acdc39a Remove platform config from composer.json 2017-12-22 13:51:04 +07:00
Markus Staab
e6df0f23d8
moved symfony finder to dev-dependency 2017-12-14 10:48:21 +01:00
fagai
591cb8d447 Update composer.json 2017-11-23 12:26:50 +09:00
Anton Medvedev
d7cc264086 Update phpunit 2017-09-04 20:17:14 +07:00
Anton Medvedev
f43b4233b9 Update composer.json
Remove suggest section.
2017-04-03 15:37:55 +07:00
Anton Medvedev
732176373d Add deployer/phar-update as dependency 2017-03-25 15:51:49 +07:00
Anton Medvedev
e5d499a92f Add logger 2017-03-23 18:40:45 +07:00
Anton Medvedev
20bde909c4 Remove elfet/pure 2017-03-19 23:47:53 +07:00