diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8124caf..c70aa7e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,6 @@ name: CI on: - push: pull_request: concurrency: @@ -39,6 +38,9 @@ jobs: - wp-launchpad/phpunit-wp-hooks - wp-launchpad/renderer-take-off - wp-launchpad/take-off + - wp-launchpad/ajax + - wp-launchpad/cron + - wp-launchpad/context name: ${{ matrix.component }} WP ${{ matrix.wp-versions }} with PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }}. @@ -79,10 +81,9 @@ jobs: - name: Run ${{ matrix.component }} install run: | - composer global require soyuka/pmu - composer global config allow-plugins.soyuka/pmu true --no-interaction + composer i + composer link . --permanent composer ${{matrix.component}} config allow-plugins.composer/installers false --no-interaction - composer global link . --permanent composer ${{matrix.component}} update - name: Require phpcov for coverage reporting diff --git a/composer.json b/composer.json index 837616e..0c6c4c2 100644 --- a/composer.json +++ b/composer.json @@ -1,25 +1,36 @@ { "name": "wp-launchpad/launchpad-develop", "minimum-stability": "dev", - "require": { - "wp-launchpad/launchpad": "@dev", - "wp-launchpad/logger": "@dev", - "wp-launchpad/renderer": "@dev", - "wp-launchpad/bus": "@dev", - "wp-launchpad/options": "@dev", - "wp-launchpad/uninstaller": "@dev" - }, "require-dev": { - "soyuka/pmu": "^0.0.15" + "soyuka/pmu": "v0.0.16" }, + "repositories": [ + { + "type": "git", + "url": "git@github.com:CrochetFeve0251/pmu.git" + } + ], "extra": { "pmu": { - "projects": ["./packages/*/composer.json"] + "projects": ["packages/*/composer.json"] } }, + "replace": { + "wp-launchpad/core": "self.version", + "wp-launchpad/build": "self.version", + "wp-launchpad/cli": "self.version", + "wp-launchpad/constants": "self.version", + "wp-launchpad/logger": "self.version", + "wp-launchpad/bus": "self.version", + "wp-launchpad/renderer": "self.version", + "wp-launchpad/filesystem": "self.version", + "wp-launchpad/uninstaller": "self.version", + "wp-launchpad/dispatcher": "self.version" + }, "config": { "allow-plugins": { - "soyuka/pmu": true + "soyuka/pmu": true, + "composer/installers": true } } } diff --git a/packages/action-scheduler-take-off/composer.json b/packages/action-scheduler-take-off/composer.json index 1868846..818a898 100644 --- a/packages/action-scheduler-take-off/composer.json +++ b/packages/action-scheduler-take-off/composer.json @@ -1,43 +1,42 @@ { - "name": "wp-launchpad/action-scheduler-take-off", - "description": "Initialisation library for Action Scheduler from Launchpad framework", - "minimum-stability": "stable", - "license": "proprietary", - "type": "library", - "authors": [ - { - "name": "coquardcyr", - "email": "coquardcyr@gmail.com" + "name": "wp-launchpad/action-scheduler-take-off", + "description": "Initialisation library for Action Scheduler from Launchpad framework", + "license": "proprietary", + "type": "library", + "authors": [ + { + "name": "coquardcyr", + "email": "coquardcyr@gmail.com" + } + ], + "require": { + "wp-launchpad/cli": "^3.1", + "woocommerce/action-scheduler": "^3.4", + "ext-json": "*" + }, + "require-dev": { + "phpunit/phpunit": "^7.5 || ^8 || ^9", + "wp-media/phpunit": "^3.0" + }, + "autoload": { + "psr-4": { + "LaunchpadActionSchedulerTakeOff\\": "inc/" + } + }, + "autoload-dev": { + "psr-4": { + "LaunchpadActionSchedulerTakeOff\\Tests\\": "tests/" + } + }, + "extra": { + "launchpad": { + "provider": "LaunchpadActionSchedulerTakeOff\\ServiceProvider", + "command": "action-scheduler:initialize", + "install": true, + "clean": true, + "libraries": { + "wp-launchpad/action-scheduler": "^0.0.2" + } + } } - ], - "require": { - "wp-launchpad/cli": "1.0.*", - "woocommerce/action-scheduler": "^3.4", - "ext-json": "*" - }, - "require-dev": { - "phpunit/phpunit": "^7.5 || ^8 || ^9", - "wp-media/phpunit": "^3.0" - }, - "autoload": { - "psr-4": { - "LaunchpadActionSchedulerTakeOff\\": "inc/" - } - }, - "autoload-dev": { - "psr-4": { - "LaunchpadActionSchedulerTakeOff\\Tests\\": "tests/" - } - }, - "extra": { - "launchpad": { - "provider" : "LaunchpadActionSchedulerTakeOff\\ServiceProvider", - "command": "action-scheduler:initialize", - "install": true, - "clean": true, - "libraries" : { - "wp-launchpad/action-scheduler": "^0.0.2" - } - } - } } diff --git a/packages/action-scheduler/composer.json b/packages/action-scheduler/composer.json index ac1e8d5..c9fb3b2 100644 --- a/packages/action-scheduler/composer.json +++ b/packages/action-scheduler/composer.json @@ -1,30 +1,29 @@ - { - "name": "wp-launchpad/action-scheduler", - "description": "Action Scheduler library for Launchpad framework", - "license": "proprietary", - "type": "library", - "authors": [ - { - "name": "coquardcyr", - "email": "coquardcyr@gmail.com" + "name": "wp-launchpad/action-scheduler", + "description": "Action Scheduler library for Launchpad framework", + "license": "proprietary", + "type": "library", + "authors": [ + { + "name": "coquardcyr", + "email": "coquardcyr@gmail.com" + } + ], + "require": { + "woocommerce/action-scheduler": "^3.4" + }, + "require-dev": { + "phpunit/phpunit": "^7.5 || ^8 || ^9", + "wp-media/phpunit": "^3.0" + }, + "autoload": { + "psr-4": { + "LaunchpadActionScheduler\\": "inc/" + } + }, + "autoload-dev": { + "psr-4": { + "LaunchpadActionScheduler\\Tests\\": "tests/" + } } - ], - "require": { - "woocommerce/action-scheduler": "^3.4" - }, - "require-dev": { - "phpunit/phpunit": "^7.5 || ^8 || ^9", - "wp-media/phpunit": "^3.0" - }, - "autoload": { - "psr-4": { - "LaunchpadActionScheduler\\": "inc/" - } - }, - "autoload-dev": { - "psr-4": { - "LaunchpadActionScheduler\\Tests\\": "tests/" - } - } } diff --git a/packages/ajax/composer.json b/packages/ajax/composer.json new file mode 100644 index 0000000..7009406 --- /dev/null +++ b/packages/ajax/composer.json @@ -0,0 +1,35 @@ +{ + "name": "wp-launchpad/ajax", + "description": "Ajax module for Launchpad", + "keywords": [ + "wordpress" + ], + "license": "GPL-2.0-or-later", + "authors": [ + { + "name": "CrochetFeve0251" + } + ], + "autoload": { + "psr-4": { + "LaunchpadAjax\\": "inc/" + } + }, + "autoload-dev": { + "psr-4": { + "LaunchpadAjax\\Tests\\": "tests/" + } + }, + "require": { + "wp-launchpad/core": "^3.1" + }, + "require-dev": { + "wp-media/phpunit": "^3.0" + }, + "scripts": { + "test-integration": "\"vendor/bin/phpunit\" --testsuite integration --colors=always --configuration tests/Integration/phpunit.xml.dist --exclude-group AdminOnly", + "run-tests": [ + "@test-integration" + ] + } +} diff --git a/packages/ajax/inc/ServiceProvider.php b/packages/ajax/inc/ServiceProvider.php new file mode 100644 index 0000000..45922a1 --- /dev/null +++ b/packages/ajax/inc/ServiceProvider.php @@ -0,0 +1,11 @@ +register_init_subscriber(Subscriber::class); + } +} \ No newline at end of file diff --git a/packages/ajax/inc/Subscriber.php b/packages/ajax/inc/Subscriber.php new file mode 100644 index 0000000..3909435 --- /dev/null +++ b/packages/ajax/inc/Subscriber.php @@ -0,0 +1,59 @@ +getMethod( $method ); + $doc_comment = $method_reflection->getDocComment(); + if ( ! $doc_comment ) { + continue; + } + $pattern = '#@ajax\s(?[a-zA-Z\\\-_$/]+)(\s(?[0-9]+))?(\s(?no-private))?#'; + + preg_match_all( $pattern, $doc_comment, $matches, PREG_PATTERN_ORDER ); + if ( ! $matches ) { + continue; + } + + + foreach ( $matches[0] as $index => $match ) { + + $base_hook = $matches['private'][$index] ? 'wp_ajax_nopriv_': 'wp_ajax_'; + + $hook = "{$base_hook}{$matches['name'][ $index ]}"; + $hook = str_replace( '$prefix', $this->prefix, $hook ); + $hook = $this->dispatcher->apply_string_filters("{$this->prefix}core_subscriber_event_hook", $hook, $classname); + + $events[ $hook ][] = [ + $method, + key_exists( 'priority', $matches ) && key_exists( $index, $matches['priority'] ) && '' !== $matches['priority'][ $index ] ? (int) $matches['priority'][ $index ] : 10, + $method_reflection->getNumberOfParameters(), + ]; + } + } + + return $events; + } +} \ No newline at end of file diff --git a/packages/ajax/tests/Fixtures/inc/data/AjaxAnnotationSubscriber.php b/packages/ajax/tests/Fixtures/inc/data/AjaxAnnotationSubscriber.php new file mode 100644 index 0000000..289142b --- /dev/null +++ b/packages/ajax/tests/Fixtures/inc/data/AjaxAnnotationSubscriber.php @@ -0,0 +1,13 @@ + [ + 'config' => [ + 'events' => [ + + ], + 'classname' => \LaunchpadAjax\Tests\Fixtures\inc\data\AjaxAnnotationSubscriber::class + ], + 'expected' => [ + 'wp_ajax_event' => [ + ['save_admin', 10, 0] + ] + ] + ], + 'ajaxAnnotationWithExistingEventShouldAddToEvent' => [ + 'config' => [ + 'events' => [ + 'test_event' => [ + ['save_my_settings', 10, 0] + ], + ], + 'classname' => \LaunchpadAjax\Tests\Fixtures\inc\data\AjaxAnnotationSubscriber::class + ], + 'expected' => [ + 'test_event' => [ + ['save_my_settings', 10, 0] + ], + 'wp_ajax_event' => [ + ['save_admin', 10, 0] + ] + ] + ], + 'ajaxNoPrivateAnnotationShouldAddToEvent' => [ + 'config' => [ + 'events' => [ + + ], + 'classname' => \LaunchpadAjax\Tests\Fixtures\inc\data\AjaxNoPrivateAnnotationSubscriber::class + ], + 'expected' => [ + 'wp_ajax_nopriv_event' => [ + ['save_admin', 10, 0] + ] + ] + ], +]; \ No newline at end of file diff --git a/packages/ajax/tests/Integration/TestCase.php b/packages/ajax/tests/Integration/TestCase.php new file mode 100644 index 0000000..cf022b1 --- /dev/null +++ b/packages/ajax/tests/Integration/TestCase.php @@ -0,0 +1,35 @@ +config ) ) { + $this->loadTestDataConfig(); + } + } + + public function configTestData() { + if ( empty( $this->config ) ) { + $this->loadTestDataConfig(); + } + + return isset( $this->config['test_data'] ) ? $this->config['test_data'] : $this->config; + } + + protected function loadTestDataConfig() { + $obj = new ReflectionObject( $this ); + $filename = $obj->getFileName(); + + $this->config = $this->getTestData( dirname( $filename ), basename( $filename, '.php' ) ); + } + +} \ No newline at end of file diff --git a/packages/ajax/tests/Integration/bootstrap.php b/packages/ajax/tests/Integration/bootstrap.php new file mode 100644 index 0000000..6bdf1a2 --- /dev/null +++ b/packages/ajax/tests/Integration/bootstrap.php @@ -0,0 +1,4 @@ +load([ + 'prefix' => $prefix, + 'version' => '3.16' + ], [ + ServiceProvider::class, + ]); + + $events = apply_filters("{$prefix}core_subscriber_events", $config['events'], $config['classname']); + + $this->assertSame($expected, $events); + } +} \ No newline at end of file diff --git a/packages/ajax/tests/Integration/init-tests.php b/packages/ajax/tests/Integration/init-tests.php new file mode 100644 index 0000000..8da4f6d --- /dev/null +++ b/packages/ajax/tests/Integration/init-tests.php @@ -0,0 +1,12 @@ + + + + + ../../inc + + + + + inc + + + \ No newline at end of file diff --git a/packages/berlindb/composer.json b/packages/berlindb/composer.json index b5c67df..9134cd3 100644 --- a/packages/berlindb/composer.json +++ b/packages/berlindb/composer.json @@ -1,47 +1,46 @@ { - "name": "wp-launchpad/berlindb", - "description": "BerlinDB library for Launchpad framework", - "minimum-stability": "stable", - "type": "library", - "authors": [ - { - "name": "coquardcyr", - "email": "coquardcyr@gmail.com" + "name": "wp-launchpad/berlindb", + "description": "BerlinDB library for Launchpad framework", + "type": "library", + "authors": [ + { + "name": "coquardcyr", + "email": "coquardcyr@gmail.com" + } + ], + "require": { + "wp-launchpad/cli": "^3.1", + "berlindb/core": "^2.0", + "composer/composer": "^2.5" + }, + "require-dev": { + "brain/monkey": "^2.0", + "phpunit/phpunit": "^7.5 || ^8 || ^9", + "wp-media/phpunit": "^3.0", + "mikey179/vfsstream": "^1.6" + }, + "autoload": { + "psr-4": { + "LaunchpadBerlinDB\\": "inc/" + } + }, + "autoload-dev": { + "psr-4": { + "LaunchpadBerlinDB\\Tests\\": "tests/" + } + }, + "extra": { + "launchpad": { + "provider": "LaunchpadBerlinDB\\ServiceProvider", + "libraries": { + "berlindb/core": "^2.0" + } + } + }, + "scripts": { + "test-integration": "\"vendor/bin/phpunit\" --testsuite integration --colors=always --configuration tests/Integration/phpunit.xml.dist", + "run-tests": [ + "@test-integration" + ] } - ], - "require": { - "wp-launchpad/cli": "^1.0.1", - "berlindb/core": "^2.0", - "composer/composer": "^2.5" - }, - "require-dev": { - "brain/monkey": "^2.0", - "phpunit/phpunit": "^7.5 || ^8 || ^9", - "wp-media/phpunit": "^3.0", - "mikey179/vfsstream": "^1.6" - }, - "autoload": { - "psr-4": { - "LaunchpadBerlinDB\\": "inc/" - } - }, - "autoload-dev": { - "psr-4": { - "LaunchpadBerlinDB\\Tests\\": "tests/" - } - }, - "extra": { - "launchpad": { - "provider" : "LaunchpadBerlinDB\\ServiceProvider", - "libraries": { - "berlindb/core": "^2.0" - } - } - }, - "scripts": { - "test-integration": "\"vendor/bin/phpunit\" --testsuite integration --colors=always --configuration tests/Integration/phpunit.xml.dist", - "run-tests": [ - "@test-integration" - ] - } } diff --git a/packages/berlindb/tests/Integration/.phpunit.result.cache b/packages/berlindb/tests/Integration/.phpunit.result.cache index b16b31a..878f055 100644 --- a/packages/berlindb/tests/Integration/.phpunit.result.cache +++ b/packages/berlindb/tests/Integration/.phpunit.result.cache @@ -1 +1 @@ -{"version":1,"defects":{"RocketLauncherDatabase\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableWithoutProviderShouldGenerateItAndRegister\"":4,"RocketLauncherDatabase\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableWithProviderShouldRegister\"":4,"RocketLauncherDatabase\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableWithAutoresolverShouldRegister\"":4,"RocketLauncherDatabase\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableWithAutoresolverShortShouldRegister\"":4,"RocketLauncherDatabase\\Tests\\Integration\\inc\\Commands\\InstallCommand\\Test_Execute::testShouldDoAsExpected with data set \"shouldInstall\"":3,"RocketLauncherDatabase\\Tests\\Integration\\inc\\Commands\\InstallCommand\\Test_Execute::testShouldDoAsExpected with data set \"shouldNotInstall\"":3,"LaunchpadBerlinDB\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableWithFieldsShouldGenerateRows\"":3,"LaunchpadBerlinDB\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableSubnamespacehouldAdapt\"":3,"LaunchpadBerlinDB\\Tests\\Integration\\inc\\Commands\\InstallCommand\\Test_Execute::testShouldDoAsExpected with data set \"shouldInstall\"":3,"LaunchpadBerlinDB\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableWithoutProviderShouldGenerateItAndRegister\"":3,"LaunchpadBerlinDB\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableWithProviderShouldRegister\"":3,"LaunchpadBerlinDB\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableWithAutoresolverShouldRegister\"":3,"LaunchpadBerlinDB\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableWithAutoresolverShortShouldRegister\"":3},"times":{"RocketLauncherDatabase\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableWithoutProviderShouldGenerateItAndRegister\"":1.597,"RocketLauncherDatabase\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableWithProviderShouldRegister\"":0.12,"RocketLauncherDatabase\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableWithAutoresolverShouldRegister\"":0.118,"RocketLauncherDatabase\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableWithAutoresolverShortShouldRegister\"":0.117,"RocketLauncherDatabase\\Tests\\Integration\\inc\\Commands\\InstallCommand\\Test_Execute::testShouldDoAsExpected with data set \"shouldInstall\"":0.014,"RocketLauncherDatabase\\Tests\\Integration\\inc\\Commands\\InstallCommand\\Test_Execute::testShouldDoAsExpected with data set \"shouldNotInstall\"":0.014,"LaunchpadBerlinDB\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableWithoutProviderShouldGenerateItAndRegister\"":1.305,"LaunchpadBerlinDB\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableWithProviderShouldRegister\"":0.102,"LaunchpadBerlinDB\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableWithAutoresolverShouldRegister\"":0.101,"LaunchpadBerlinDB\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableWithAutoresolverShortShouldRegister\"":0.1,"LaunchpadBerlinDB\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableWithFieldsShouldGenerateRows\"":0.15,"LaunchpadBerlinDB\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableSubnamespacehouldAdapt\"":0.203,"LaunchpadBerlinDB\\Tests\\Integration\\inc\\Commands\\InstallCommand\\Test_Execute::testShouldDoAsExpected with data set \"shouldInstall\"":0.039,"LaunchpadBerlinDB\\Tests\\Integration\\inc\\Commands\\InstallCommand\\Test_Execute::testShouldDoAsExpected with data set \"shouldNotInstall\"":0.011}} \ No newline at end of file +{"version":1,"defects":{"RocketLauncherDatabase\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableWithoutProviderShouldGenerateItAndRegister\"":4,"RocketLauncherDatabase\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableWithProviderShouldRegister\"":4,"RocketLauncherDatabase\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableWithAutoresolverShouldRegister\"":4,"RocketLauncherDatabase\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableWithAutoresolverShortShouldRegister\"":4,"RocketLauncherDatabase\\Tests\\Integration\\inc\\Commands\\InstallCommand\\Test_Execute::testShouldDoAsExpected with data set \"shouldInstall\"":3,"RocketLauncherDatabase\\Tests\\Integration\\inc\\Commands\\InstallCommand\\Test_Execute::testShouldDoAsExpected with data set \"shouldNotInstall\"":3,"LaunchpadBerlinDB\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableWithFieldsShouldGenerateRows\"":3,"LaunchpadBerlinDB\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableSubnamespacehouldAdapt\"":3,"LaunchpadBerlinDB\\Tests\\Integration\\inc\\Commands\\InstallCommand\\Test_Execute::testShouldDoAsExpected with data set \"shouldInstall\"":3,"LaunchpadBerlinDB\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableWithoutProviderShouldGenerateItAndRegister\"":3,"LaunchpadBerlinDB\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableWithProviderShouldRegister\"":3,"LaunchpadBerlinDB\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableWithAutoresolverShouldRegister\"":3,"LaunchpadBerlinDB\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableWithAutoresolverShortShouldRegister\"":3},"times":{"RocketLauncherDatabase\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableWithoutProviderShouldGenerateItAndRegister\"":1.597,"RocketLauncherDatabase\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableWithProviderShouldRegister\"":0.12,"RocketLauncherDatabase\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableWithAutoresolverShouldRegister\"":0.118,"RocketLauncherDatabase\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableWithAutoresolverShortShouldRegister\"":0.117,"RocketLauncherDatabase\\Tests\\Integration\\inc\\Commands\\InstallCommand\\Test_Execute::testShouldDoAsExpected with data set \"shouldInstall\"":0.014,"RocketLauncherDatabase\\Tests\\Integration\\inc\\Commands\\InstallCommand\\Test_Execute::testShouldDoAsExpected with data set \"shouldNotInstall\"":0.014,"LaunchpadBerlinDB\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableWithoutProviderShouldGenerateItAndRegister\"":5.722,"LaunchpadBerlinDB\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableWithProviderShouldRegister\"":0.604,"LaunchpadBerlinDB\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableWithAutoresolverShouldRegister\"":0.667,"LaunchpadBerlinDB\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableWithAutoresolverShortShouldRegister\"":0.66,"LaunchpadBerlinDB\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableWithFieldsShouldGenerateRows\"":0.809,"LaunchpadBerlinDB\\Tests\\Integration\\inc\\Commands\\GenerateTableCommand\\Test_Execute::testShouldDoAsExpected with data set \"generateTableSubnamespacehouldAdapt\"":1.189,"LaunchpadBerlinDB\\Tests\\Integration\\inc\\Commands\\InstallCommand\\Test_Execute::testShouldDoAsExpected with data set \"shouldInstall\"":0.039,"LaunchpadBerlinDB\\Tests\\Integration\\inc\\Commands\\InstallCommand\\Test_Execute::testShouldDoAsExpected with data set \"shouldNotInstall\"":0.011}} \ No newline at end of file diff --git a/packages/bud-assets/composer.json b/packages/bud-assets/composer.json index 27ce61a..210d34e 100644 --- a/packages/bud-assets/composer.json +++ b/packages/bud-assets/composer.json @@ -10,12 +10,12 @@ } ], "require": { - "wp-launchpad/filesystem": "v0.0.3 || @dev" + "wp-launchpad/filesystem": "^3.1" }, "require-dev": { "phpunit/phpunit": "^7.5 || ^8 || ^9", "wp-media/phpunit": "^3.0", - "wp-launchpad/cli": "^v1.1 || @dev" + "wp-launchpad/cli": "^3.1" }, "autoload": { "psr-4": { diff --git a/packages/bud-assets/tests/Unit/.phpunit.result.cache b/packages/bud-assets/tests/Unit/.phpunit.result.cache index ea012b1..17e878e 100644 --- a/packages/bud-assets/tests/Unit/.phpunit.result.cache +++ b/packages/bud-assets/tests/Unit/.phpunit.result.cache @@ -1 +1 @@ -{"version":1,"defects":{"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_enqueueScript::testShouldDoAsExpected with data set \"budAssetWithDependenciesShouldRegisterAlone\"":4,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_enqueueStyle::testShouldDoAsExpected with data set \"budAssetWithDependenciesShouldRegisterAlone\"":4,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_enqueueScript::testShouldDoAsExpected with data set \"notBudAssetWithDependenciesShouldRegisterAll\"":4,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_enqueueScript::testShouldDoAsExpected with data set \"budAssetWithDependenciesWithoutEntryFileShouldRegisterAlone\"":4,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_enqueueScript::testShouldDoAsExpected with data set \"budAssetWithDependenciesWithoutEntryFileContentShouldRegisterAlone\"":4,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_enqueueStyle::testShouldDoAsExpected with data set \"notBudAssetWithDependenciesShouldRegisterAll\"":4,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_enqueueStyle::testShouldDoAsExpected with data set \"budAssetWithDependenciesWithoutEntryFileShouldRegisterAlone\"":4,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_enqueueStyle::testShouldDoAsExpected with data set \"budAssetWithDependenciesWithoutEntryFileContentShouldRegisterAlone\"":4,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_getFullKey::testShouldReturnAsExpected with data set \"shouldReturnFullKey\"":5,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_getRealUrl::testShouldReturnAsExpected with data set \"budAssetShouldReturnRightPath\"":4,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_getRealUrl::testShouldReturnAsExpected with data set \"notBudAssetShouldReturnSame\"":4,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_getRealUrl::testShouldReturnAsExpected with data set \"budAssetWithoutManifestShouldReturnSame\"":4,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_getRealUrl::testShouldReturnAsExpected with data set \"budAssetWithoutManifestContentShouldReturnSame\"":4,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_registerScript::testShouldDoAsExpected":4,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_registerStyle::testShouldDoAsExpected":4,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected":3,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withStyle::testShouldReturnAsExpected":3,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected with data set \"callWithoutActionShouldReturnBuilderWithoutDoingSomethingElse\"":4,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected with data set \"enqueueShouldCallQueueFunction\"":4,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected with data set \"registerShouldCallRegisterFunction\"":4,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected with data set \"affectKeyAndRegisterShouldUseNewKey\"":4,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected with data set \"affectKeyAndEnqueueShouldCallQueueFunction\"":4,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected with data set \"registerWithAQueryAndWrongPageShouldNotRegister\"":3,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected with data set \"registerWithAQueryAndRightPageShouldNotRegister\"":3,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected with data set \"enqueueWithAQueryAndWrongPageShouldNotEnqueue\"":4},"times":{"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_enqueueScript::testShouldDoAsExpected with data set \"budAssetWithDependenciesShouldRegisterAlone\"":3.372,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_enqueueScript::testShouldDoAsExpected with data set \"notBudAssetWithDependenciesShouldRegisterAll\"":0.052,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_enqueueScript::testShouldDoAsExpected with data set \"budAssetWithDependenciesWithoutEntryFileShouldRegisterAlone\"":0.05,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_enqueueScript::testShouldDoAsExpected with data set \"budAssetWithDependenciesWithoutEntryFileContentShouldRegisterAlone\"":0.051,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_enqueueStyle::testShouldDoAsExpected with data set \"budAssetWithDependenciesShouldRegisterAlone\"":0.082,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_enqueueStyle::testShouldDoAsExpected with data set \"notBudAssetWithDependenciesShouldRegisterAll\"":0.053,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_enqueueStyle::testShouldDoAsExpected with data set \"budAssetWithDependenciesWithoutEntryFileShouldRegisterAlone\"":0.051,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_enqueueStyle::testShouldDoAsExpected with data set \"budAssetWithDependenciesWithoutEntryFileContentShouldRegisterAlone\"":0.05,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_getFullKey::testShouldReturnAsExpected with data set \"shouldReturnFullKey\"":0.081,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_getRealUrl::testShouldReturnAsExpected with data set \"budAssetShouldReturnRightPath\"":0.025,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_getRealUrl::testShouldReturnAsExpected with data set \"notBudAssetShouldReturnSame\"":0.025,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_getRealUrl::testShouldReturnAsExpected with data set \"budAssetWithoutManifestShouldReturnSame\"":0.023,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_getRealUrl::testShouldReturnAsExpected with data set \"budAssetWithoutManifestContentShouldReturnSame\"":0.025,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_registerScript::testShouldDoAsExpected":0.041,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_registerStyle::testShouldDoAsExpected":0.008,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected":0.004,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withStyle::testShouldReturnAsExpected":0.046,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected with data set \"callWithoutActionShouldReturnBuilderWithoutDoingSomethingElse\"":0.109,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected with data set \"enqueueShouldCallQueueFunction\"":0.091,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected with data set \"registerShouldCallRegisterFunction\"":0.088,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected with data set \"affectKeyAndRegisterShouldUseNewKey\"":0.086,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected with data set \"affectKeyAndEnqueueShouldCallQueueFunction\"":0.085,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected with data set \"registerWithAQueryAndWrongPageShouldNotRegister\"":0.125,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected with data set \"registerWithAQueryAndRightPageShouldNotRegister\"":0.083,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected with data set \"enqueueWithAQueryAndWrongPageShouldNotEnqueue\"":0.084,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected with data set \"registerWithAQueryAndRightPageShouldRegister\"":0.087,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected with data set \"enqueueWithAQueryAndRightPageShouldEnqueue\"":0.085}} \ No newline at end of file +{"version":1,"defects":{"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_enqueueScript::testShouldDoAsExpected with data set \"budAssetWithDependenciesShouldRegisterAlone\"":4,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_enqueueStyle::testShouldDoAsExpected with data set \"budAssetWithDependenciesShouldRegisterAlone\"":4,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_enqueueScript::testShouldDoAsExpected with data set \"notBudAssetWithDependenciesShouldRegisterAll\"":4,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_enqueueScript::testShouldDoAsExpected with data set \"budAssetWithDependenciesWithoutEntryFileShouldRegisterAlone\"":4,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_enqueueScript::testShouldDoAsExpected with data set \"budAssetWithDependenciesWithoutEntryFileContentShouldRegisterAlone\"":4,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_enqueueStyle::testShouldDoAsExpected with data set \"notBudAssetWithDependenciesShouldRegisterAll\"":4,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_enqueueStyle::testShouldDoAsExpected with data set \"budAssetWithDependenciesWithoutEntryFileShouldRegisterAlone\"":4,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_enqueueStyle::testShouldDoAsExpected with data set \"budAssetWithDependenciesWithoutEntryFileContentShouldRegisterAlone\"":4,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_getFullKey::testShouldReturnAsExpected with data set \"shouldReturnFullKey\"":5,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_getRealUrl::testShouldReturnAsExpected with data set \"budAssetShouldReturnRightPath\"":4,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_getRealUrl::testShouldReturnAsExpected with data set \"notBudAssetShouldReturnSame\"":4,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_getRealUrl::testShouldReturnAsExpected with data set \"budAssetWithoutManifestShouldReturnSame\"":4,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_getRealUrl::testShouldReturnAsExpected with data set \"budAssetWithoutManifestContentShouldReturnSame\"":4,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_registerScript::testShouldDoAsExpected":4,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_registerStyle::testShouldDoAsExpected":4,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected":3,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withStyle::testShouldReturnAsExpected":3,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected with data set \"callWithoutActionShouldReturnBuilderWithoutDoingSomethingElse\"":4,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected with data set \"enqueueShouldCallQueueFunction\"":4,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected with data set \"registerShouldCallRegisterFunction\"":4,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected with data set \"affectKeyAndRegisterShouldUseNewKey\"":4,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected with data set \"affectKeyAndEnqueueShouldCallQueueFunction\"":4,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected with data set \"registerWithAQueryAndWrongPageShouldNotRegister\"":3,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected with data set \"registerWithAQueryAndRightPageShouldNotRegister\"":3,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected with data set \"enqueueWithAQueryAndWrongPageShouldNotEnqueue\"":4},"times":{"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_enqueueScript::testShouldDoAsExpected with data set \"budAssetWithDependenciesShouldRegisterAlone\"":3.492,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_enqueueScript::testShouldDoAsExpected with data set \"notBudAssetWithDependenciesShouldRegisterAll\"":0.052,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_enqueueScript::testShouldDoAsExpected with data set \"budAssetWithDependenciesWithoutEntryFileShouldRegisterAlone\"":0.051,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_enqueueScript::testShouldDoAsExpected with data set \"budAssetWithDependenciesWithoutEntryFileContentShouldRegisterAlone\"":0.05,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_enqueueStyle::testShouldDoAsExpected with data set \"budAssetWithDependenciesShouldRegisterAlone\"":0.082,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_enqueueStyle::testShouldDoAsExpected with data set \"notBudAssetWithDependenciesShouldRegisterAll\"":0.053,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_enqueueStyle::testShouldDoAsExpected with data set \"budAssetWithDependenciesWithoutEntryFileShouldRegisterAlone\"":0.05,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_enqueueStyle::testShouldDoAsExpected with data set \"budAssetWithDependenciesWithoutEntryFileContentShouldRegisterAlone\"":0.051,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_getFullKey::testShouldReturnAsExpected with data set \"shouldReturnFullKey\"":0.082,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_getRealUrl::testShouldReturnAsExpected with data set \"budAssetShouldReturnRightPath\"":0.026,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_getRealUrl::testShouldReturnAsExpected with data set \"notBudAssetShouldReturnSame\"":0.025,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_getRealUrl::testShouldReturnAsExpected with data set \"budAssetWithoutManifestShouldReturnSame\"":0.024,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_getRealUrl::testShouldReturnAsExpected with data set \"budAssetWithoutManifestContentShouldReturnSame\"":0.026,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_registerScript::testShouldDoAsExpected":0.089,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_registerStyle::testShouldDoAsExpected":0.008,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected":0.004,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withStyle::testShouldReturnAsExpected":0.049,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected with data set \"callWithoutActionShouldReturnBuilderWithoutDoingSomethingElse\"":0.11,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected with data set \"enqueueShouldCallQueueFunction\"":0.095,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected with data set \"registerShouldCallRegisterFunction\"":0.092,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected with data set \"affectKeyAndRegisterShouldUseNewKey\"":0.088,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected with data set \"affectKeyAndEnqueueShouldCallQueueFunction\"":0.089,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected with data set \"registerWithAQueryAndWrongPageShouldNotRegister\"":0.131,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected with data set \"registerWithAQueryAndRightPageShouldNotRegister\"":0.083,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected with data set \"enqueueWithAQueryAndWrongPageShouldNotEnqueue\"":0.085,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected with data set \"registerWithAQueryAndRightPageShouldRegister\"":0.09,"LaunchpadBudAssets\\Tests\\Unit\\inc\\Assets\\Test_withScript::testShouldReturnAsExpected with data set \"enqueueWithAQueryAndRightPageShouldEnqueue\"":0.087}} \ No newline at end of file diff --git a/packages/build/composer.json b/packages/build/composer.json index b89f580..5481337 100644 --- a/packages/build/composer.json +++ b/packages/build/composer.json @@ -1,34 +1,34 @@ { - "name": "wp-launchpad/build", - "description": "Build library for the Launchpad framework", - "license": "proprietary", - "type": "library", - "authors": [ - { - "name": "coquardcyr", - "email": "coquardcyr@gmail.com" + "name": "wp-launchpad/build", + "description": "Build library for the Launchpad framework", + "license": "proprietary", + "type": "library", + "authors": [ + { + "name": "coquardcyr", + "email": "coquardcyr@gmail.com" + } + ], + "require": { + "wp-launchpad/cli": "^3.1", + "ext-mbstring": "*", + "ext-json": "*", + "composer/composer": "^2.5", + "nelexa/zip": "^4.0", + "league/pipeline": "^1.0" + }, + "require-dev": { + "phpunit/phpunit": "^7.5 || ^8 || ^9", + "wp-media/phpunit": "^3.0" + }, + "autoload": { + "psr-4": { + "LaunchpadBuild\\": "inc/" + } + }, + "autoload-dev": { + "psr-4": { + "LaunchpadBuild\\Tests\\": "tests/" + } } - ], - "require": { - "wp-launchpad/cli": "^1.1 || @dev", - "ext-mbstring": "*", - "ext-json": "*", - "composer/composer": "^2.5", - "nelexa/zip": "^4.0", - "league/pipeline": "^1.0" - }, - "require-dev": { - "phpunit/phpunit": "^7.5 || ^8 || ^9", - "wp-media/phpunit": "^3.0" - }, - "autoload": { - "psr-4": { - "LaunchpadBuild\\": "inc/" - } - }, - "autoload-dev": { - "psr-4": { - "LaunchpadBuild\\Tests\\": "tests/" - } - } } diff --git a/packages/bus-take-off/composer.json b/packages/bus-take-off/composer.json index 2ac572c..ca03bdb 100644 --- a/packages/bus-take-off/composer.json +++ b/packages/bus-take-off/composer.json @@ -1,44 +1,43 @@ { - "name": "wp-launchpad/bus-take-off", - "minimum-stability": "dev", - "description": "Initialisation library for the bus library from the Launchpad framework", - "require": { - "wp-launchpad/cli": "^1.0.1", - "ext-mbstring": "*", - "ext-json": "*", - "composer/composer": "^2.5" - }, - "require-dev": { - "brain/monkey": "^2.0", - "phpunit/phpunit": "^7.5 || ^8 || ^9", - "wp-media/phpunit": "^3.0", - "mikey179/vfsstream": "^1.6", - "wp-launchpad/bus": "^1.2" - }, - "autoload": { - "psr-4": { - "LaunchpadBusTakeOff\\": "inc/" + "name": "wp-launchpad/bus-take-off", + "description": "Initialisation library for the bus library from the Launchpad framework", + "require": { + "wp-launchpad/cli": "^3.1", + "ext-mbstring": "*", + "ext-json": "*", + "composer/composer": "^2.5" + }, + "require-dev": { + "brain/monkey": "^2.0", + "phpunit/phpunit": "^7.5 || ^8 || ^9", + "wp-media/phpunit": "^3.0", + "mikey179/vfsstream": "^1.6", + "wp-launchpad/bus": "^3.1" + }, + "autoload": { + "psr-4": { + "LaunchpadBusTakeOff\\": "inc/" + } + }, + "autoload-dev": { + "psr-4": { + "LaunchpadBusTakeOff\\Tests\\": "tests/" + } + }, + "extra": { + "launchpad": { + "provider": "LaunchpadBusTakeOff\\ServiceProvider", + "command": "bus:install", + "install": true, + "libraries": { + "wp-launchpad/bus": "^1.3" + } + } + }, + "scripts": { + "test-integration": "\"vendor/bin/phpunit\" --testsuite integration --colors=always --configuration tests/Integration/phpunit.xml.dist --exclude-group AdminOnly", + "run-tests": [ + "@test-integration" + ] } - }, - "autoload-dev": { - "psr-4": { - "LaunchpadBusTakeOff\\Tests\\": "tests/" - } - }, - "extra": { - "launchpad": { - "provider" : "LaunchpadBusTakeOff\\ServiceProvider", - "command": "bus:install", - "install": true, - "libraries": { - "wp-launchpad/bus": "^1.3" - } - } - }, - "scripts": { - "test-integration": "\"vendor/bin/phpunit\" --testsuite integration --colors=always --configuration tests/Integration/phpunit.xml.dist --exclude-group AdminOnly", - "run-tests": [ - "@test-integration" - ] - } } diff --git a/packages/bus/composer.json b/packages/bus/composer.json index ea98f39..3da0c73 100644 --- a/packages/bus/composer.json +++ b/packages/bus/composer.json @@ -1,42 +1,41 @@ { - "name": "wp-launchpad/bus", - "minimum-stability": "dev", - "description": "Command bus for Launchpad framework", - "type": "library", - "keywords": [ - "wordpress", - "framework", - "plugin" - ], - "license": "GPL-2.0-or-later", - "authors": [ - { - "name": "CrochetFeve0251" + "name": "wp-launchpad/bus", + "description": "Command bus for Launchpad framework", + "type": "library", + "keywords": [ + "wordpress", + "framework", + "plugin" + ], + "license": "GPL-2.0-or-later", + "authors": [ + { + "name": "CrochetFeve0251" + } + ], + "require": { + "wp-launchpad/core": "^3.1", + "league/tactician": "^1.1" + }, + "require-dev": { + "wp-media/phpunit": "^3.0", + "wp-launchpad/cli": "^3.1", + "wp-launchpad/phpunit-wp-hooks": "^3.1" + }, + "autoload": { + "psr-4": { + "LaunchpadBus\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "LaunchpadBus\\Tests\\": "tests/" + } + }, + "scripts": { + "test-integration": "\"vendor/bin/phpunit\" --testsuite integration --colors=always --configuration tests/Integration/phpunit.xml.dist", + "run-tests": [ + "@test-integration" + ] } - ], - "require": { - "wp-launchpad/core": "^0.3 || @dev", - "league/tactician": "^1.1" - }, - "require-dev": { - "wp-media/phpunit": "^3.0", - "wp-launchpad/cli": "^1.1 || @dev", - "wp-launchpad/phpunit-wp-hooks": "^1.0 || @dev" - }, - "autoload": { - "psr-4": { - "LaunchpadBus\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "LaunchpadBus\\Tests\\": "tests/" - } - }, - "scripts": { - "test-integration": "\"vendor/bin/phpunit\" --testsuite integration --colors=always --configuration tests/Integration/phpunit.xml.dist", - "run-tests": [ - "@test-integration" - ] - } } diff --git a/packages/bus/tests/Integration/bootstrap.php b/packages/bus/tests/Integration/bootstrap.php index 740d111..3ded911 100644 --- a/packages/bus/tests/Integration/bootstrap.php +++ b/packages/bus/tests/Integration/bootstrap.php @@ -24,9 +24,10 @@ function() { } $container = new Container(); + $dispatcher = new Dispatcher(); $prefix = 'test'; - $plugin = new Plugin($container, new EventManager(), new SubscriberWrapper($prefix, $container), new Dispatcher()); + $plugin = new Plugin($container, new EventManager(), new SubscriberWrapper($prefix, $container, $dispatcher), $dispatcher); $plugin->load([ 'prefix' => $prefix, 'version' => '3.16' diff --git a/packages/cli/composer.json b/packages/cli/composer.json index 09f0c43..3541440 100644 --- a/packages/cli/composer.json +++ b/packages/cli/composer.json @@ -1,41 +1,41 @@ { - "name": "wp-launchpad/cli", - "description": "CLI library for the Launchpad framework", - "license": "proprietary", - "type": "library", - "authors": [ - { - "name": "coquardcyr", - "email": "coquardcyr@gmail.com" + "name": "wp-launchpad/cli", + "description": "CLI library for the Launchpad framework", + "license": "proprietary", + "type": "library", + "authors": [ + { + "name": "coquardcyr", + "email": "coquardcyr@gmail.com" + } + ], + "require": { + "league/flysystem": "^1.1.10", + "adhocore/cli": "^v0.9.0", + "ext-json": "*", + "league/event": "^3.0" + }, + "require-dev": { + "brain/monkey": "^2.0", + "phpunit/phpunit": "^7.5 || ^8 || ^9", + "wp-media/phpunit": "^3.0", + "mikey179/vfsstream": "^1.6" + }, + "autoload": { + "psr-4": { + "LaunchpadCLI\\": "inc/" + } + }, + "autoload-dev": { + "psr-4": { + "LaunchpadCLI\\Tests\\": "tests/" + } + }, + "scripts": { + "test-unit": "\"vendor/bin/phpunit\" --testsuite unit --colors=always --configuration tests/Unit/phpunit.xml.dist", + "test-integration": "\"vendor/bin/phpunit\" --testsuite integration --colors=always --configuration tests/Integration/phpunit.xml.dist --exclude-group AdminOnly", + "run-tests": [ + "@test-integration" + ] } - ], - "require": { - "league/flysystem": "^1.1.10", - "adhocore/cli": "^v0.9.0", - "ext-json": "*", - "league/event": "^3.0" - }, - "require-dev": { - "brain/monkey": "^2.0", - "phpunit/phpunit": "^7.5 || ^8 || ^9", - "wp-media/phpunit": "^3.0", - "mikey179/vfsstream": "^1.6" - }, - "autoload": { - "psr-4": { - "LaunchpadCLI\\": "inc/" - } - }, - "autoload-dev": { - "psr-4": { - "LaunchpadCLI\\Tests\\": "tests/" - } - }, - "scripts": { - "test-unit": "\"vendor/bin/phpunit\" --testsuite unit --colors=always --configuration tests/Unit/phpunit.xml.dist", - "test-integration": "\"vendor/bin/phpunit\" --testsuite integration --colors=always --configuration tests/Integration/phpunit.xml.dist --exclude-group AdminOnly", - "run-tests": [ - "@test-integration" - ] - } } diff --git a/packages/constants/composer.json b/packages/constants/composer.json index fca7ff7..c3b9bc2 100644 --- a/packages/constants/composer.json +++ b/packages/constants/composer.json @@ -1,23 +1,23 @@ { - "name": "wp-launchpad/constants", - "description": "Constants from Launchpad", - "keywords": [ - "wordpress" - ], - "autoload": { - "psr-4": { - "LaunchpadConstants\\": "inc/" + "name": "wp-launchpad/constants", + "description": "Constants from Launchpad", + "keywords": [ + "wordpress" + ], + "autoload": { + "psr-4": { + "LaunchpadConstants\\": "inc/" + } + }, + "autoload-dev": { + "psr-4": { + "LaunchpadConstants\\Tests\\": "tests/" + } + }, + "require": { + "wp-launchpad/dispatcher": "^3.1" + }, + "require-dev": { + "wp-media/phpunit": "^3.0" } - }, - "autoload-dev": { - "psr-4": { - "LaunchpadConstants\\Tests\\": "tests/" - } - }, - "require": { - "wp-launchpad/dispatcher": "^1.0 || @dev" - }, - "require-dev": { - "wp-media/phpunit": "^3.0" - } } diff --git a/packages/context/composer.json b/packages/context/composer.json new file mode 100644 index 0000000..7abab27 --- /dev/null +++ b/packages/context/composer.json @@ -0,0 +1,35 @@ +{ + "name": "wp-launchpad/context", + "description": "Context module for Launchpad", + "keywords": [ + "wordpress" + ], + "license": "GPL-2.0-or-later", + "authors": [ + { + "name": "CrochetFeve0251" + } + ], + "autoload": { + "psr-4": { + "LaunchpadContext\\": "inc/" + } + }, + "autoload-dev": { + "psr-4": { + "LaunchpadContext\\Tests\\": "tests/" + } + }, + "require": { + "wp-launchpad/core": "^3.1" + }, + "require-dev": { + "wp-media/phpunit": "^3.0" + }, + "scripts": { + "test-integration": "\"vendor/bin/phpunit\" --testsuite integration --colors=always --configuration tests/Integration/phpunit.xml.dist --exclude-group AdminOnly", + "run-tests": [ + "@test-integration" + ] + } +} diff --git a/packages/context/inc/ContextSubscriber.php b/packages/context/inc/ContextSubscriber.php new file mode 100644 index 0000000..a55d504 --- /dev/null +++ b/packages/context/inc/ContextSubscriber.php @@ -0,0 +1,116 @@ +context_mapper = []; + } + + + /** + * Triggers the context to disable a method. + * + * @hook $prefixcore_subscriber_callback_enabled + * + * @param boolean $activated Is the method activated. + * @param string $classname Name from the class from the method. + * @param string $method Name from the method. + * + * @return mixed + */ + public function trigger_context($activated, $classname, $method) { + + if(! key_exists("$classname::$method", $this->context_mapper)) { + $this->context_mapper["$classname::$method"] = $this->load($classname, $method); + } + + if(! $this->context_mapper["$classname::$method"]) { + return $activated; + } + + $id = ltrim($this->context_mapper["$classname::$method"], '\\'); + + $context = $this->getContainer()->get($id); + + return $context($classname, $method); + } + + /** + * Load the context from the method. + * + * @param string $classname Classname from the method. + * @param string $method Name from the method. + * @return string + * + * @throws \ReflectionException + */ + protected function load(string $classname, string $method): string { + + $reflection_class = new ReflectionClass( $classname ); + $docblock = $reflection_class->getDocComment() ? $reflection_class->getDocComment() : ''; + $context = $this->fetch_context( $docblock ) ?: ''; + try { + $method_reflection = $reflection_class->getMethod( $method ); + } catch ( \ReflectionException $e ) { + return $context; + } + $doc_comment = $method_reflection->getDocComment(); + if ( ! $doc_comment ) { + return $context; + } + + $method_context = $this->fetch_context( $doc_comment ); + + if (! $method_context ) { + return $context; + } + + return $method_context; + } + + /** + * Fetch context from the docblock. + * + * @param string $docblock Docblock to fetch from. + * + * @return string|null + */ + protected function fetch_context( string $docblock ) { + if ( '' === $docblock ) { + return null; + } + + $pattern = '#@context\s(?[a-zA-Z0-9\\\-_$/]+)#'; + + preg_match( $pattern, $docblock, $match ); + if ( ! $match ) { + return null; + } + + if ( ! class_exists( $match['name'] ) ) { + return null; + } + + return $match['name']; + } +} \ No newline at end of file diff --git a/packages/context/inc/ServiceProvider.php b/packages/context/inc/ServiceProvider.php new file mode 100644 index 0000000..12e9a2c --- /dev/null +++ b/packages/context/inc/ServiceProvider.php @@ -0,0 +1,15 @@ +register_init_subscriber(ContextSubscriber::class); + } +} \ No newline at end of file diff --git a/packages/context/tests/Fixtures/inc/ContextSubscriber/data/Context.php b/packages/context/tests/Fixtures/inc/ContextSubscriber/data/Context.php new file mode 100644 index 0000000..2b56837 --- /dev/null +++ b/packages/context/tests/Fixtures/inc/ContextSubscriber/data/Context.php @@ -0,0 +1,9 @@ +register_common_subscriber(EnabledSubscriber::class); + $this->register_common_subscriber(Subscriber::class); + $this->register_common_subscriber(NoContextSubscriber::class); + $this->register_common_subscriber(TrailingSubscriber::class); + + $this->register_service(Context::class); + $this->register_service(EnabledContext::class); + } +} \ No newline at end of file diff --git a/packages/context/tests/Fixtures/inc/ContextSubscriber/data/Subscriber.php b/packages/context/tests/Fixtures/inc/ContextSubscriber/data/Subscriber.php new file mode 100644 index 0000000..4a4f728 --- /dev/null +++ b/packages/context/tests/Fixtures/inc/ContextSubscriber/data/Subscriber.php @@ -0,0 +1,14 @@ + [ + 'config' => [ + 'subscriber' => Subscriber::class, + 'method' => 'my_callback' + ], + 'expected' => [ + 'called' => false, + ] + ], + 'enabledContextShouldCall' => [ + 'config' => [ + 'subscriber' => EnabledSubscriber::class, + 'method' => 'my_callback' + ], + 'expected' => [ + 'called' => true, + ] + ], + 'noContextShouldCall' => [ + 'config' => [ + 'subscriber' => \LaunchpadContext\Tests\Fixtures\inc\ContextSubscriber\data\NoContextSubscriber::class, + 'method' => 'my_callback' + ], + 'expected' => [ + 'called' => true, + ] + ], + 'TrailingSlashShouldCall' => [ + 'config' => [ + 'subscriber' => \LaunchpadContext\Tests\Fixtures\inc\ContextSubscriber\data\TrailingSubscriber::class, + 'method' => 'my_callback' + ], + 'expected' => [ + 'called' => false, + ] + ], +]; \ No newline at end of file diff --git a/packages/context/tests/Integration/TestCase.php b/packages/context/tests/Integration/TestCase.php new file mode 100644 index 0000000..b75a487 --- /dev/null +++ b/packages/context/tests/Integration/TestCase.php @@ -0,0 +1,35 @@ +config ) ) { + $this->loadTestDataConfig(); + } + } + + public function configTestData() { + if ( empty( $this->config ) ) { + $this->loadTestDataConfig(); + } + + return isset( $this->config['test_data'] ) ? $this->config['test_data'] : $this->config; + } + + protected function loadTestDataConfig() { + $obj = new ReflectionObject( $this ); + $filename = $obj->getFileName(); + + $this->config = $this->getTestData( dirname( $filename ), basename( $filename, '.php' ) ); + } + +} \ No newline at end of file diff --git a/packages/context/tests/Integration/bootstrap.php b/packages/context/tests/Integration/bootstrap.php new file mode 100644 index 0000000..6bdf1a2 --- /dev/null +++ b/packages/context/tests/Integration/bootstrap.php @@ -0,0 +1,4 @@ +load([ + 'prefix' => $prefix, + 'version' => '3.16' + ], [ + ServiceProvider::class, + \LaunchpadContext\Tests\Fixtures\inc\ContextSubscriber\data\ServiceProvider::class, + ]); + + $enabled = apply_filters("{$prefix}core_subscriber_callback_enabled", true, $config['subscriber'], $config['method']); + $this->assertSame($expected['called'], $enabled); + } +} \ No newline at end of file diff --git a/packages/context/tests/Integration/init-tests.php b/packages/context/tests/Integration/init-tests.php new file mode 100644 index 0000000..8da4f6d --- /dev/null +++ b/packages/context/tests/Integration/init-tests.php @@ -0,0 +1,12 @@ + + + + + ../../inc + + + + + inc + + + \ No newline at end of file diff --git a/packages/core/composer.json b/packages/core/composer.json index bac64a5..ce2cd30 100644 --- a/packages/core/composer.json +++ b/packages/core/composer.json @@ -23,12 +23,12 @@ "require": { "php": ">=7.2", "league/container": "^4.2.2", - "wp-launchpad/dispatcher": "^1.0 || @dev" + "wp-launchpad/dispatcher": "^3.1" }, "require-dev": { "wp-media/phpunit": "^3.0", - "wp-launchpad/cli": "^1.0.2 || @dev", - "wp-launchpad/phpunit-wp-hooks": "^1.0 || @dev", + "wp-launchpad/cli": "^3.1", + "wp-launchpad/phpunit-wp-hooks": "^3.1", "phpstan/phpstan": "^1.10", "szepeviktor/phpstan-wordpress": "^1.3", "wp-coding-standards/wpcs": "^3", diff --git a/packages/core/inc/Dispatcher/Sanitizer/EventSanitizer.php b/packages/core/inc/Dispatcher/Sanitizer/EventSanitizer.php new file mode 100644 index 0000000..3f91ad3 --- /dev/null +++ b/packages/core/inc/Dispatcher/Sanitizer/EventSanitizer.php @@ -0,0 +1,25 @@ +prefix = $prefix; $this->container = $container; + $this->dispatcher = $dispatcher; } /** * Wrap a subscriber will the common interface for subscribers. * - * @param object $instance Any class subscriber. + * @param string $instance Any class subscriber. * - * @return SubscriberInterface + * @return ClassicSubscriberInterface * @throws ReflectionException Error is the class name is not valid. */ - public function wrap( $instance ): SubscriberInterface { - if ( $instance instanceof OptimizedSubscriberInterface ) { - return new WrappedSubscriber( $this->container, $instance, $instance->get_subscribed_events() ); + public function wrap( string $instance ): ClassicSubscriberInterface { + $parents = class_implements( $instance ); + + if ( in_array(OptimizedSubscriberInterface::class, $parents) ) { + return new WrappedSubscriber( $this->container, $this->dispatcher, $this->prefix, $instance, $instance::get_subscribed_events() ); + } + + if( in_array( ClassicSubscriberInterface::class, $parents ) ) { + return new $instance; } $methods = get_class_methods( $instance ); - $reflection_class = new ReflectionClass( get_class( $instance ) ); + $reflection_class = new ReflectionClass( $instance ); $events = []; - $contexts = []; - $docblock = $reflection_class->getDocComment() ? $reflection_class->getDocComment() : ''; - $context = $this->fetch_context( $docblock ); foreach ( $methods as $method ) { - $contexts[ $method ] = $context; $method_reflection = $reflection_class->getMethod( $method ); $doc_comment = $method_reflection->getDocComment(); if ( ! $doc_comment ) { @@ -69,14 +80,10 @@ public function wrap( $instance ): SubscriberInterface { continue; } - $method_context = $this->fetch_context( $doc_comment ); - - if ( $method_context ) { - $contexts[ $method ] = $method_context; - } foreach ( $matches[0] as $index => $match ) { $hook = str_replace( '$prefix', $this->prefix, $matches['name'][ $index ] ); + $hook = $this->dispatcher->apply_string_filters("{$this->prefix}core_subscriber_event_hook", $hook, $instance); $events[ $hook ][] = [ $method, @@ -86,32 +93,8 @@ public function wrap( $instance ): SubscriberInterface { } } - return new WrappedSubscriber( $this->container, $instance, $events, $contexts ); - } - - /** - * Fetch context from the docblock. - * - * @param string $docblock Docblock to fetch from. - * - * @return string|null - */ - protected function fetch_context( string $docblock ) { - if ( '' === $docblock ) { - return null; - } - - $pattern = '#@context\s(?[a-zA-Z0-9\\\-_$/]+)#'; - - preg_match( $pattern, $docblock, $match ); - if ( ! $match ) { - return null; - } - - if ( ! class_exists( $match['name'] ) ) { - return null; - } + $events = $this->dispatcher->apply_filters("{$this->prefix}core_subscriber_events", new EventSanitizer(), $events, $instance); - return $match['name']; + return new WrappedSubscriber( $this->container, $this->dispatcher, $this->prefix, $instance, $events ); } } diff --git a/packages/core/inc/EventManagement/Wrapper/WrappedSubscriber.php b/packages/core/inc/EventManagement/Wrapper/WrappedSubscriber.php index faf9bac..680480c 100644 --- a/packages/core/inc/EventManagement/Wrapper/WrappedSubscriber.php +++ b/packages/core/inc/EventManagement/Wrapper/WrappedSubscriber.php @@ -3,6 +3,7 @@ namespace LaunchpadCore\EventManagement\Wrapper; use LaunchpadCore\EventManagement\ClassicSubscriberInterface; +use LaunchpadDispatcher\Dispatcher; use Psr\Container\ContainerInterface; class WrappedSubscriber implements ClassicSubscriberInterface { @@ -21,13 +22,6 @@ class WrappedSubscriber implements ClassicSubscriberInterface { */ protected $events; - /** - * Methods contexts. - * - * @var array - */ - protected $contexts; - /** * Container. * @@ -35,19 +29,31 @@ class WrappedSubscriber implements ClassicSubscriberInterface { */ protected $container; + protected $prefix; + + /** + * @var Dispatcher + */ + protected $dispatcher; + + /** + * @var string + */ + protected $classname; + /** * Instantiate the class. * * @param ContainerInterface $container Container. - * @param object $instance Real Subscriber. + * @param string $classname Real Subscriber. * @param array $events Mapping from the events from the subscriber. - * @param array $contexts Methods contexts. */ - public function __construct( ContainerInterface $container, $instance, array $events = [], array $contexts = [] ) { + public function __construct( ContainerInterface $container, Dispatcher $dispatcher, string $prefix, string $classname, array $events = [] ) { $this->container = $container; - $this->instance = $instance; + $this->classname = $classname; $this->events = $events; - $this->contexts = $contexts; + $this->prefix = $prefix; + $this->dispatcher = $dispatcher; } /** @@ -86,16 +92,22 @@ public function __call( $name, $arguments ) { return $this->{$name}( ...$arguments ); } - if ( ! key_exists( $name, $this->contexts ) || ! $this->contexts[ $name ] || $this->container->get( $this->contexts[ $name ] )() ) { - return $this->instance->{$name}( ...$arguments ); + if("{$this->prefix}core_subscriber_callback_enabled" !== current_filter() && ! $this->dispatcher->apply_bool_filters("{$this->prefix}core_subscriber_callback_enabled", true, $this->classname, $name, $arguments)) { + + if ( count( $arguments ) === 0 ) { + return; + } + + $parameter = array_shift( $arguments ); + + return $parameter; } - if ( count( $arguments ) === 0 ) { - return; + if(! $this->instance) { + $this->instance = $this->container->get($this->classname); } - $parameter = array_shift( $arguments ); - return $parameter; + return $this->instance->{$name}( ...$arguments ); } } diff --git a/packages/core/inc/Plugin.php b/packages/core/inc/Plugin.php index 753ea92..263b94c 100644 --- a/packages/core/inc/Plugin.php +++ b/packages/core/inc/Plugin.php @@ -12,6 +12,7 @@ use LaunchpadCore\EventManagement\Wrapper\SubscriberWrapper; use LaunchpadDispatcher\Dispatcher; use League\Container\Argument\Literal\StringArgument; +use League\Container\ContainerAwareInterface; use Psr\Container\ContainerExceptionInterface; use Psr\Container\ContainerInterface; use LaunchpadCore\Container\IsOptimizableServiceProvider; @@ -111,6 +112,7 @@ public function load( array $params, array $providers = [] ) { $this->container->inflector( PrefixAwareInterface::class )->invokeMethod( 'set_prefix', [ $this->container->get( 'prefix' ) ] ); $this->container->inflector( DispatcherAwareInterface::class )->invokeMethod( 'set_dispatcher', [ $this->container->get( 'dispatcher' ) ] ); + $this->container->inflector( ContainerAwareInterface::class )->invokeMethod( 'setContainer', [ $this->container ] ); $providers = array_map( function ( $classname ) { @@ -218,10 +220,7 @@ private function load_init_subscribers( ServiceProviderInterface $service_provid } foreach ( $subscribers as $subscriber ) { - $subscriber_object = $this->container->get( $subscriber ); - if ( ! $subscriber_object instanceof ClassicSubscriberInterface ) { - $subscriber_object = $this->subscriber_wrapper->wrap( $subscriber_object ); - } + $subscriber_object = $this->subscriber_wrapper->wrap( $subscriber ); $this->event_manager->add_subscriber( $subscriber_object ); } @@ -263,10 +262,7 @@ private function load_subscribers( ServiceProviderInterface $service_provider_in } foreach ( $subscribers as $subscriber ) { - $subscriber_object = $this->container->get( $subscriber ); - if ( ! $subscriber_object instanceof ClassicSubscriberInterface ) { - $subscriber_object = $this->subscriber_wrapper->wrap( $subscriber_object ); - } + $subscriber_object = $this->subscriber_wrapper->wrap( $subscriber ); $this->event_manager->add_subscriber( $subscriber_object ); } diff --git a/packages/core/inc/boot.php b/packages/core/inc/boot.php index 551467e..8d38168 100644 --- a/packages/core/inc/boot.php +++ b/packages/core/inc/boot.php @@ -81,7 +81,7 @@ function () use ( $params, $providers ) { $plugin = new Plugin( $container, new EventManager(), - new SubscriberWrapper( $prefix, $container ), + new SubscriberWrapper( $prefix, $container, $dispatcher ), $dispatcher ); diff --git a/packages/core/tests/Integration/inc/Context/context.php b/packages/core/tests/Integration/inc/Context/context.php index 5ee519d..304e6a0 100644 --- a/packages/core/tests/Integration/inc/Context/context.php +++ b/packages/core/tests/Integration/inc/Context/context.php @@ -18,6 +18,7 @@ public function tear_down() { * @dataProvider configTestData */ public function testShouldDoAsExpected($config, $expected) { + $this->markTestSkipped('Context no longer part of core'); require_once LAUNCHPAD_PLUGIN_ROOT . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'boot.php'; boot($config['plugin']); diff --git a/packages/core/tests/Integration/inc/Traits/SetupPluginTrait.php b/packages/core/tests/Integration/inc/Traits/SetupPluginTrait.php index 9bbb510..55bd73c 100644 --- a/packages/core/tests/Integration/inc/Traits/SetupPluginTrait.php +++ b/packages/core/tests/Integration/inc/Traits/SetupPluginTrait.php @@ -27,8 +27,8 @@ protected function setup_plugin(string $prefix, array $providers = []) { $this->event_manager = new EventManager(); $this->container = new Container(); - $this->subscriber_wrapper = new SubscriberWrapper($prefix, $this->container); - $this->dispatcher = new Dispatcher(); + $this->dispatcher = new Dispatcher(); + $this->subscriber_wrapper = new SubscriberWrapper($prefix, $this->container, $this->dispatcher); $this->plugin = new Plugin($this->container, $this->event_manager, $this->subscriber_wrapper, $this->dispatcher); $this->plugin->load([ diff --git a/packages/cron/composer.json b/packages/cron/composer.json new file mode 100644 index 0000000..b8c48f7 --- /dev/null +++ b/packages/cron/composer.json @@ -0,0 +1,35 @@ +{ + "name": "wp-launchpad/cron", + "description": "Cron module for Launchpad", + "keywords": [ + "wordpress" + ], + "license": "GPL-2.0-or-later", + "authors": [ + { + "name": "CrochetFeve0251" + } + ], + "autoload": { + "psr-4": { + "LaunchpadCron\\": "inc/" + } + }, + "autoload-dev": { + "psr-4": { + "LaunchpadCron\\Tests\\": "tests/" + } + }, + "require": { + "wp-launchpad/core": "^3.1" + }, + "require-dev": { + "wp-media/phpunit": "^3.0" + }, + "scripts": { + "test-integration": "\"vendor/bin/phpunit\" --testsuite integration --colors=always --configuration tests/Integration/phpunit.xml.dist --exclude-group AdminOnly", + "run-tests": [ + "@test-integration" + ] + } +} diff --git a/packages/cron/inc/CronSubscriber.php b/packages/cron/inc/CronSubscriber.php new file mode 100644 index 0000000..f46ca87 --- /dev/null +++ b/packages/cron/inc/CronSubscriber.php @@ -0,0 +1,145 @@ +events = []; + $this->schedules = []; + } + + + /** + * Parse the cron annotations. + * + * @hook $prefixcore_subscriber_events + * + * @param array $events Class events. + * @param string $classname Classname. + * @return array + */ + public function parse_crons($events, $classname) { + if(! is_array($events)) { + return $events; + } + + $methods = get_class_methods( $classname ); + $reflection_class = new ReflectionClass( $classname ); + foreach ( $methods as $method ) { + $method_reflection = $reflection_class->getMethod( $method ); + $doc_comment = $method_reflection->getDocComment(); + if ( ! $doc_comment ) { + continue; + } + $pattern = '#@cron\s(?[a-zA-Z\\-_$/]+)(\s(?[0-9]+))?(\s(?[a-zA-Z\\-_$/]+))#'; + + preg_match_all( $pattern, $doc_comment, $matches, PREG_PATTERN_ORDER ); + if ( ! $matches ) { + continue; + } + + foreach ( $matches[0] as $index => $match ) { + $hook = $matches['name'][ $index ]; + $hook = str_replace( '$prefix', $this->prefix, $hook ); + $hook = $this->dispatcher->apply_string_filters("{$this->prefix}core_subscriber_event_hook", $hook, $classname); + + $events[ $hook ][] = [ + $method, + key_exists( 'priority', $matches ) && key_exists( $index, $matches['priority'] ) && '' !== $matches['priority'][ $index ] ? (int) $matches['priority'][ $index ] : 10, + $method_reflection->getNumberOfParameters(), + ]; + + $this->events[ $hook ] = $matches['schedule'][$index]; + } + } + + $constants = $reflection_class->getConstants(); + + foreach ( $constants as $name => $value ) { + $reflection_constant = $reflection_class->getReflectionConstant($name); + $doc_comment = $reflection_constant->getDocComment(); + if ( ! $doc_comment ) { + continue; + } + $pattern = '#@cron-schedule\s(?[a-zA-Z\\-_$/]+)#'; + preg_match_all( $pattern, $doc_comment, $matches, PREG_PATTERN_ORDER ); + if ( ! $matches ) { + continue; + } + foreach ( $matches[0] as $index => $match ) { + $name = $matches['name'][ $index ]; + + $this->schedules[ $name ] = $value; + } + } + + return $events; + } + + /** + * Register events. + * + * @hook init + */ + public function register_events() + { + foreach ( $this->events as $event => $schedule ) { + if ( wp_next_scheduled( $event ) ) { + continue; + } + + wp_schedule_event( time(), $schedule, $event ); + } + } + + /** + * Register schedules. + * + * @hook cron_schedules + */ + public function register_schedules($schedules) + { + if( ! is_array($schedules)) { + return $schedules; + } + + foreach ($this->schedules as $schedule => $period) { + if(key_exists($schedule, $schedules)) { + continue; + } + $schedules[$schedule] = [ + 'interval' => $period, + 'display' => $schedule, + ]; + } + + return $schedules; + } +} \ No newline at end of file diff --git a/packages/cron/inc/ServiceProvider.php b/packages/cron/inc/ServiceProvider.php new file mode 100644 index 0000000..db4f44e --- /dev/null +++ b/packages/cron/inc/ServiceProvider.php @@ -0,0 +1,17 @@ +register_init_subscriber(CronSubscriber::class); + } +} \ No newline at end of file diff --git a/packages/cron/tests/Fixtures/inc/CronSubscriber/data/CronSubscriber.php b/packages/cron/tests/Fixtures/inc/CronSubscriber/data/CronSubscriber.php new file mode 100644 index 0000000..5bf56af --- /dev/null +++ b/packages/cron/tests/Fixtures/inc/CronSubscriber/data/CronSubscriber.php @@ -0,0 +1,19 @@ + [ + 'config' => [ + 'events' => [], + 'classname' => CronSubscriber::class, + 'schedules' => [] + ], + 'expected' => [ + 'events' => [ + 'my-event' => [ + ['action', 20, 0] + ] + ], + 'crons' => [ + 'my-event' => 'my-scheduling' + ], + 'schedules' => [ + 'my-scheduling' => [ + 'interval' => CronSubscriber::WEEKLY, + 'display' => 'my-scheduling' + ], + ], + ] + ] +]; \ No newline at end of file diff --git a/packages/cron/tests/Integration/TestCase.php b/packages/cron/tests/Integration/TestCase.php new file mode 100644 index 0000000..f55697e --- /dev/null +++ b/packages/cron/tests/Integration/TestCase.php @@ -0,0 +1,35 @@ +config ) ) { + $this->loadTestDataConfig(); + } + } + + public function configTestData() { + if ( empty( $this->config ) ) { + $this->loadTestDataConfig(); + } + + return isset( $this->config['test_data'] ) ? $this->config['test_data'] : $this->config; + } + + protected function loadTestDataConfig() { + $obj = new ReflectionObject( $this ); + $filename = $obj->getFileName(); + + $this->config = $this->getTestData( dirname( $filename ), basename( $filename, '.php' ) ); + } + +} \ No newline at end of file diff --git a/packages/cron/tests/Integration/bootstrap.php b/packages/cron/tests/Integration/bootstrap.php new file mode 100644 index 0000000..6bdf1a2 --- /dev/null +++ b/packages/cron/tests/Integration/bootstrap.php @@ -0,0 +1,4 @@ +load([ + 'prefix' => $prefix, + 'version' => '3.16' + ], [ + ServiceProvider::class, + ]); + + $events = apply_filters("{$prefix}core_subscriber_events", $config['events'], $config['classname']); + + $schedules = apply_filters("cron_schedules", $config['schedules']); + + do_action('init'); + + $this->assertSame($expected['events'], $events); + $this->assertSame($expected['schedules'], $schedules); + foreach ($expected['crons'] as $event => $schedule) { + $scheduled_event = wp_get_scheduled_event($event); + $this->assertNotFalse($scheduled_event); + $this->assertSame($schedule, $scheduled_event->schedule); + } + } +} \ No newline at end of file diff --git a/packages/cron/tests/Integration/init-tests.php b/packages/cron/tests/Integration/init-tests.php new file mode 100644 index 0000000..8da4f6d --- /dev/null +++ b/packages/cron/tests/Integration/init-tests.php @@ -0,0 +1,12 @@ + + + + + ../../inc + + + + + inc + + + \ No newline at end of file diff --git a/packages/dispatcher/composer.json b/packages/dispatcher/composer.json index 77f38e3..4cba7c2 100644 --- a/packages/dispatcher/composer.json +++ b/packages/dispatcher/composer.json @@ -1,49 +1,49 @@ { - "name": "wp-launchpad/dispatcher", - "description": "Dispatcher library for Launchpad framework", - "keywords": [ - "wordpress" - ], - "license": "GPL-2.0-or-later", - "authors": [ - { - "name": "CrochetFeve0251" + "name": "wp-launchpad/dispatcher", + "description": "Dispatcher library for Launchpad framework", + "keywords": [ + "wordpress" + ], + "license": "GPL-2.0-or-later", + "authors": [ + { + "name": "CrochetFeve0251" + } + ], + "autoload": { + "psr-4": { + "LaunchpadDispatcher\\": "inc/" + } + }, + "autoload-dev": { + "psr-4": { + "LaunchpadDispatcher\\Tests\\": "tests/" + } + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "wp-media/phpunit": "^3.0", + "wp-launchpad/cli": "^3.1", + "wp-launchpad/phpunit-wp-hooks": "^3.1", + "wp-coding-standards/wpcs": "^3", + "phpcompatibility/phpcompatibility-wp": "^2.0", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0" + }, + "scripts": { + "phpcs": "phpcs --basepath=.", + "phpcs-changed": "./bin/phpcs-changed.sh", + "phpcs:fix": "phpcbf", + "test-unit": "\"vendor/bin/phpunit\" --testsuite unit --colors=always --configuration tests/Unit/phpunit.xml.dist", + "test-integration": "\"vendor/bin/phpunit\" --testsuite integration --colors=always --configuration tests/Integration/phpunit.xml.dist", + "run-tests": [ + "@test-integration" + ] + }, + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + } } - ], - "autoload": { - "psr-4": { - "LaunchpadDispatcher\\": "inc/" - } - }, - "autoload-dev": { - "psr-4": { - "LaunchpadDispatcher\\Tests\\": "tests/" - } - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "wp-media/phpunit": "^3.0", - "wp-launchpad/cli": "^1.0.2 || @dev", - "wp-launchpad/phpunit-wp-hooks": "^1.0 || @dev", - "wp-coding-standards/wpcs": "^3", - "phpcompatibility/phpcompatibility-wp": "^2.0", - "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0" - }, - "scripts": { - "phpcs": "phpcs --basepath=.", - "phpcs-changed": "./bin/phpcs-changed.sh", - "phpcs:fix": "phpcbf", - "test-unit": "\"vendor/bin/phpunit\" --testsuite unit --colors=always --configuration tests/Unit/phpunit.xml.dist", - "test-integration": "\"vendor/bin/phpunit\" --testsuite integration --colors=always --configuration tests/Integration/phpunit.xml.dist", - "run-tests": [ - "@test-integration" - ] - }, - "config": { - "allow-plugins": { - "dealerdirect/phpcodesniffer-composer-installer": true - } - } -} \ No newline at end of file +} diff --git a/packages/filesystem-take-off/composer.json b/packages/filesystem-take-off/composer.json index 6e48c1e..d8b4398 100644 --- a/packages/filesystem-take-off/composer.json +++ b/packages/filesystem-take-off/composer.json @@ -1,25 +1,24 @@ { - "name": "wp-launchpad/filesystem-take-off", - "description": "Initialize filesystem library for Launchpad framework", - "minimum-stability": "stable", - "license": "proprietary", - "type": "library", - "authors": [ - { - "name": "coquardcyr", - "email": "coquardcyr@gmail.com" + "name": "wp-launchpad/filesystem-take-off", + "description": "Initialize filesystem library for Launchpad framework", + "license": "proprietary", + "type": "library", + "authors": [ + { + "name": "coquardcyr", + "email": "coquardcyr@gmail.com" + } + ], + "require": { + "wp-launchpad/filesystem": "^3.1" + }, + "extra": { + "launchpad": { + "clean": true, + "install": true, + "libraries": { + "wp-launchpad/filesystem": "^0.0.2" + } + } } - ], - "require": { - "wp-launchpad/filesystem": "^0.0.2" - }, - "extra": { - "launchpad": { - "clean": true, - "install": true, - "libraries" : { - "wp-launchpad/filesystem": "^0.0.2" - } - } - } } diff --git a/packages/filesystem/composer.json b/packages/filesystem/composer.json index 81776cc..8f8fe86 100644 --- a/packages/filesystem/composer.json +++ b/packages/filesystem/composer.json @@ -1,28 +1,27 @@ { - "name": "wp-launchpad/filesystem", - "description": "Filesystem library for Launchpad framework", - "minimum-stability": "stable", - "license": "proprietary", - "type": "library", - "authors": [ - { - "name": "coquardcyr", - "email": "coquardcyr@gmail.com" + "name": "wp-launchpad/filesystem", + "description": "Filesystem library for Launchpad framework", + "license": "proprietary", + "type": "library", + "authors": [ + { + "name": "coquardcyr", + "email": "coquardcyr@gmail.com" + } + ], + "require": [], + "require-dev": { + "phpunit/phpunit": "^7.5 || ^8 || ^9", + "wp-media/phpunit": "^3.0" + }, + "autoload": { + "psr-4": { + "LaunchpadFilesystem\\": "inc/" + } + }, + "autoload-dev": { + "psr-4": { + "LaunchpadFilesystem\\Tests\\": "tests/" + } } - ], - "require": {}, - "require-dev": { - "phpunit/phpunit": "^7.5 || ^8 || ^9", - "wp-media/phpunit": "^3.0" - }, - "autoload": { - "psr-4": { - "LaunchpadFilesystem\\": "inc/" - } - }, - "autoload-dev": { - "psr-4": { - "LaunchpadFilesystem\\Tests\\": "tests/" - } - } } diff --git a/packages/framework-constants-take-off/composer.json b/packages/framework-constants-take-off/composer.json index 6ca4b4a..d84b1e1 100644 --- a/packages/framework-constants-take-off/composer.json +++ b/packages/framework-constants-take-off/composer.json @@ -1,14 +1,14 @@ { - "name": "wp-launchpad/framework-constants-take-off", - "description": "Constants library take off for the framework Launchpad", - "extra": { - "launchpad": { - "library_provider" : "LaunchpadFrameworkConstants\\ServiceProvider", - "clean": true, - "install": true, - "libraries" : { - "wp-launchpad/framework-constants": "^0.1" - } + "name": "wp-launchpad/framework-constants-take-off", + "description": "Constants library take off for the framework Launchpad", + "extra": { + "launchpad": { + "library_provider": "LaunchpadFrameworkConstants\\ServiceProvider", + "clean": true, + "install": true, + "libraries": { + "wp-launchpad/framework-constants": "^0.1" + } + } } - } } diff --git a/packages/framework-constants/composer.json b/packages/framework-constants/composer.json index c25f8c0..6ccc1c5 100644 --- a/packages/framework-constants/composer.json +++ b/packages/framework-constants/composer.json @@ -1,31 +1,30 @@ { - "name": "wp-launchpad/framework-constants", - "minimum-stability": "dev", - "description": "Constants library for Launchpad framework", - "keywords": [ - "wordpress" - ], - "autoload": { - "psr-4": { - "LaunchpadFrameworkConstants\\": "inc/" + "name": "wp-launchpad/framework-constants", + "description": "Constants library for Launchpad framework", + "keywords": [ + "wordpress" + ], + "autoload": { + "psr-4": { + "LaunchpadFrameworkConstants\\": "inc/" + } + }, + "autoload-dev": { + "psr-4": { + "LaunchpadFrameworkConstants\\Tests\\": "tests/" + } + }, + "require": { + "wp-launchpad/constants": "^0.0 || @dev", + "wp-launchpad/core": "^3.1" + }, + "require-dev": { + "wp-media/phpunit": "^3.0" + }, + "scripts": { + "test-integration": "\"vendor/bin/phpunit\" --testsuite integration --colors=always --configuration tests/Integration/phpunit.xml.dist --exclude-group AdminOnly", + "run-tests": [ + "@test-integration" + ] } - }, - "autoload-dev": { - "psr-4": { - "LaunchpadFrameworkConstants\\Tests\\": "tests/" - } - }, - "require": { - "wp-launchpad/constants": "^0.0 || @dev", - "wp-launchpad/core": "^0.3 || @dev" - }, - "require-dev": { - "wp-media/phpunit": "^3.0" - }, - "scripts": { - "test-integration": "\"vendor/bin/phpunit\" --testsuite integration --colors=always --configuration tests/Integration/phpunit.xml.dist --exclude-group AdminOnly", - "run-tests": [ - "@test-integration" - ] - } } diff --git a/packages/framework-constants/tests/Integration/inc/ServiceProvider.php b/packages/framework-constants/tests/Integration/inc/ServiceProvider.php index 76b369c..4d2b19d 100644 --- a/packages/framework-constants/tests/Integration/inc/ServiceProvider.php +++ b/packages/framework-constants/tests/Integration/inc/ServiceProvider.php @@ -25,7 +25,7 @@ public function testShouldReturnAsExpected() $prefix = 'prefix_'; - $plugin = new Plugin($container, $event_manager, new SubscriberWrapper($prefix, $container), $dispatcher); + $plugin = new Plugin($container, $event_manager, new SubscriberWrapper($prefix, $container, $dispatcher), $dispatcher); $plugin->load([ 'prefix' => $prefix, diff --git a/packages/framework-options-take-off/composer.json b/packages/framework-options-take-off/composer.json index efae4cf..e56f79e 100644 --- a/packages/framework-options-take-off/composer.json +++ b/packages/framework-options-take-off/composer.json @@ -1,18 +1,17 @@ { - "name": "wp-launchpad/framework-options-take-off", - "minimum-stability": "dev", - "description": "Options library take off for the framework Launchpad", - "require": { - "wp-launchpad/framework-options": "^0.3" - }, - "extra": { - "launchpad": { - "clean": true, - "install": true, - "library_provider": "LaunchpadFrameworkOptions\\ServiceProvider", - "libraries" : { - "wp-launchpad/framework-options": "^0.3" - } + "name": "wp-launchpad/framework-options-take-off", + "description": "Options library take off for the framework Launchpad", + "require": { + "wp-launchpad/framework-options": "^3.1" + }, + "extra": { + "launchpad": { + "clean": true, + "install": true, + "library_provider": "LaunchpadFrameworkOptions\\ServiceProvider", + "libraries": { + "wp-launchpad/framework-options": "^0.3" + } + } } - } } diff --git a/packages/framework-options/composer.json b/packages/framework-options/composer.json index 6abff2d..8268991 100644 --- a/packages/framework-options/composer.json +++ b/packages/framework-options/composer.json @@ -1,30 +1,29 @@ { - "name": "wp-launchpad/framework-options", - "minimum-stability": "dev", - "description": "Options library for the framework Launchpad", - "autoload": { - "psr-4": { - "LaunchpadFrameworkOptions\\": "inc/" + "name": "wp-launchpad/framework-options", + "description": "Options library for the framework Launchpad", + "autoload": { + "psr-4": { + "LaunchpadFrameworkOptions\\": "inc/" + } + }, + "autoload-dev": { + "psr-4": { + "LaunchpadFrameworkOptions\\Tests\\": "tests/" + } + }, + "require": { + "php": ">=7.0", + "wp-launchpad/options": "^3.1", + "wp-launchpad/core": "^3.1" + }, + "require-dev": { + "wp-media/phpunit": "^3.0", + "wp-launchpad/phpunit-wp-hooks": "^3.1" + }, + "scripts": { + "test-integration": "\"vendor/bin/phpunit\" --testsuite integration --colors=always --configuration tests/Integration/phpunit.xml.dist", + "run-tests": [ + "@test-integration" + ] } - }, - "autoload-dev": { - "psr-4": { - "LaunchpadFrameworkOptions\\Tests\\": "tests/" - } - }, - "require": { - "php": ">=7.0", - "wp-launchpad/options": "^0.1 || @dev", - "wp-launchpad/core": "^0.3 || @dev" - }, - "require-dev": { - "wp-media/phpunit": "^3.0", - "wp-launchpad/phpunit-wp-hooks": "^1.0 || @dev" - }, - "scripts": { - "test-integration": "\"vendor/bin/phpunit\" --testsuite integration --colors=always --configuration tests/Integration/phpunit.xml.dist", - "run-tests": [ - "@test-integration" - ] - } } diff --git a/packages/framework-options/tests/Integration/inc/ServiceProvider.php b/packages/framework-options/tests/Integration/inc/ServiceProvider.php index 6ea90d4..3842e13 100644 --- a/packages/framework-options/tests/Integration/inc/ServiceProvider.php +++ b/packages/framework-options/tests/Integration/inc/ServiceProvider.php @@ -27,7 +27,7 @@ public function testShouldReturnAsExpected() $prefix = 'prefix_'; - $plugin = new Plugin($container, $event_manager, new SubscriberWrapper($prefix, $container), $dispatcher); + $plugin = new Plugin($container, $event_manager, new SubscriberWrapper($prefix, $container, $dispatcher), $dispatcher); $plugin->load([ 'prefix' => $prefix, diff --git a/packages/front/composer.json b/packages/front/composer.json index 6abe1da..1ec513b 100644 --- a/packages/front/composer.json +++ b/packages/front/composer.json @@ -1,32 +1,31 @@ { - "name": "wp-launchpad/front", - "minimum-stability": "dev", - "description": "Front library for Launchpad framework", - "license": "proprietary", - "type": "library", - "authors": [ - { - "name": "coquardcyr", - "email": "coquardcyr@gmail.com" + "name": "wp-launchpad/front", + "description": "Front library for Launchpad framework", + "license": "proprietary", + "type": "library", + "authors": [ + { + "name": "coquardcyr", + "email": "coquardcyr@gmail.com" + } + ], + "require": { + "wp-launchpad/bud-assets": "^3.1", + "wp-launchpad/core": "^3.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.5 || ^8 || ^9", + "wp-media/phpunit": "^3.0", + "wp-launchpad/cli": "^3.1" + }, + "autoload": { + "psr-4": { + "LaunchpadFront\\": "inc/" + } + }, + "autoload-dev": { + "psr-4": { + "LaunchpadFront\\Tests\\": "tests/" + } } - ], - "require": { - "wp-launchpad/bud-assets": "^0.1 || @dev", - "wp-launchpad/core": "^0.3 || @dev" - }, - "require-dev": { - "phpunit/phpunit": "^7.5 || ^8 || ^9", - "wp-media/phpunit": "^3.0", - "wp-launchpad/cli": "^v1.1 || @dev" - }, - "autoload": { - "psr-4": { - "LaunchpadFront\\": "inc/" - } - }, - "autoload-dev": { - "psr-4": { - "LaunchpadFront\\Tests\\": "tests/" - } - } } diff --git a/packages/http-client-take-off/composer.json b/packages/http-client-take-off/composer.json index 7296ab4..58ad7c6 100644 --- a/packages/http-client-take-off/composer.json +++ b/packages/http-client-take-off/composer.json @@ -1,24 +1,23 @@ { - "name": "wp-launchpad/http-client-take-off", - "description": "HTTP Client installator library for Launchpad framework", - "minimum-stability": "stable", - "license": "proprietary", - "type": "library", - "authors": [ - { - "name": "coquardcyr", - "email": "coquardcyr@gmail.com" + "name": "wp-launchpad/http-client-take-off", + "description": "HTTP Client installator library for Launchpad framework", + "license": "proprietary", + "type": "library", + "authors": [ + { + "name": "coquardcyr", + "email": "coquardcyr@gmail.com" + } + ], + "require": { + "wp-launchpad/http-client": "^3.1" + }, + "extra": { + "launchpad": { + "libraries": { + "wp-launchpad/http-client": "^0.0.1" + }, + "clean": true + } } - ], - "require": { - "wp-launchpad/http-client": "^0.0.1" - }, - "extra": { - "launchpad": { - "libraries": { - "wp-launchpad/http-client": "^0.0.1" - }, - "clean": true - } - } -} \ No newline at end of file +} diff --git a/packages/http-client/composer.json b/packages/http-client/composer.json index 1aa2831..d2094ce 100644 --- a/packages/http-client/composer.json +++ b/packages/http-client/composer.json @@ -1,36 +1,36 @@ { - "name": "wp-launchpad/http-client", - "description": "description", - "license": "proprietary", - "authors": [ - { - "name": "cyrille", - "email": "coquardcyr@gmail.com" + "name": "wp-launchpad/http-client", + "description": "description", + "license": "proprietary", + "authors": [ + { + "name": "cyrille", + "email": "coquardcyr@gmail.com" + } + ], + "require": { + "psr/http-client": "^1.0", + "httpsoft/http-message": "^1.0" + }, + "require-dev": { + "brain/monkey": "^2.0", + "phpunit/phpunit": "^7.5 || ^8 || ^9", + "wp-media/phpunit": "^3.0" + }, + "autoload": { + "psr-4": { + "LaunchpadHTTPClient\\": "inc/" + } + }, + "autoload-dev": { + "psr-4": { + "LaunchpadHTTPClient\\Tests\\": "tests/" + } + }, + "scripts": { + "test-unit": "\"vendor/bin/phpunit\" --testsuite unit --colors=always --configuration tests/Unit/phpunit.xml.dist", + "run-tests": [ + "@test-unit" + ] } - ], - "require": { - "psr/http-client": "^1.0", - "httpsoft/http-message": "^1.0" - }, - "require-dev": { - "brain/monkey": "^2.0", - "phpunit/phpunit": "^7.5 || ^8 || ^9", - "wp-media/phpunit": "^3.0" - }, - "autoload": { - "psr-4": { - "LaunchpadHTTPClient\\": "inc/" - } - }, - "autoload-dev": { - "psr-4": { - "LaunchpadHTTPClient\\Tests\\": "tests/" - } - }, - "scripts": { - "test-unit": "\"vendor/bin/phpunit\" --testsuite unit --colors=always --configuration tests/Unit/phpunit.xml.dist", - "run-tests": [ - "@test-unit" - ] - } } diff --git a/packages/installer/composer.json b/packages/installer/composer.json index 1eab095..deef5af 100644 --- a/packages/installer/composer.json +++ b/packages/installer/composer.json @@ -1,30 +1,30 @@ { - "name": "wp-launchpad/cli-installer", - "description": "Initialisation library for Launchpad libraries", - "license": "GPL-2.0-or-later", - "type": "library", - "authors": [ - { - "name": "coquardcyr", - "email": "coquardcyr@gmail.com" + "name": "wp-launchpad/cli-installer", + "description": "Initialisation library for Launchpad libraries", + "license": "GPL-2.0-or-later", + "type": "library", + "authors": [ + { + "name": "coquardcyr", + "email": "coquardcyr@gmail.com" + } + ], + "require": { + "wp-launchpad/cli": "^3.1", + "ext-json": "*" + }, + "require-dev": { + "phpunit/phpunit": "^7.5 || ^8 || ^9", + "wp-media/phpunit": "^3.0" + }, + "autoload": { + "psr-4": { + "LaunchpadCLIInstaller\\": "inc/" + } + }, + "autoload-dev": { + "psr-4": { + "LaunchpadCLIInstaller\\Tests\\": "tests/" + } } - ], - "require": { - "wp-launchpad/cli": "^1.0.1 || @dev", - "ext-json": "*" - }, - "require-dev": { - "phpunit/phpunit": "^7.5 || ^8 || ^9", - "wp-media/phpunit": "^3.0" - }, - "autoload": { - "psr-4": { - "LaunchpadCLIInstaller\\": "inc/" - } - }, - "autoload-dev": { - "psr-4": { - "LaunchpadCLIInstaller\\Tests\\": "tests/" - } - } } diff --git a/packages/launchpad-phpstan/composer.json b/packages/launchpad-phpstan/composer.json index 8dadf7d..b511260 100644 --- a/packages/launchpad-phpstan/composer.json +++ b/packages/launchpad-phpstan/composer.json @@ -1,26 +1,26 @@ { - "name": "wp-launchpad/launchpad-phpstan", - "description": "Framework to create a modern PHP plugin in no time", - "require": { - "szepeviktor/phpstan-wordpress": "^1.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.6" - }, - "autoload": { - "psr-4": { - "Launchpad\\PHPStan\\": "src/" + "name": "wp-launchpad/launchpad-phpstan", + "description": "Framework to create a modern PHP plugin in no time", + "require": { + "szepeviktor/phpstan-wordpress": "^1.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.6" + }, + "autoload": { + "psr-4": { + "Launchpad\\PHPStan\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "Launchpad\\PHPStan\\Tests\\": "tests/" + } + }, + "scripts": { + "test-unit": "\"vendor/bin/phpunit\" --colors=always --configuration tests/phpunit.xml", + "run-tests": [ + "@test-unit" + ] } - }, - "autoload-dev": { - "psr-4": { - "Launchpad\\PHPStan\\Tests\\": "tests/" - } - }, - "scripts": { - "test-unit": "\"vendor/bin/phpunit\" --colors=always --configuration tests/phpunit.xml", - "run-tests": [ - "@test-unit" - ] - } } diff --git a/packages/launchpad/composer.json b/packages/launchpad/composer.json index 5c213bf..0440c77 100644 --- a/packages/launchpad/composer.json +++ b/packages/launchpad/composer.json @@ -1,6 +1,5 @@ { "name": "wp-launchpad/launchpad", - "minimum-stability": "dev", "description": "Framework to create a modern PHP plugin in no time", "keywords": [ "wordpress", @@ -46,12 +45,12 @@ "phpunit/phpunit": "^7.5 || ^8 || ^9", "roave/security-advisories": "dev-master", "wp-coding-standards/wpcs": "^2", - "wp-launchpad/build": "^0.0 || @dev", - "wp-launchpad/cli": "^1.0 || @dev", - "wp-launchpad/cli-installer": "^0.0 || @dev", - "wp-launchpad/core": "^v0.3.0 || @dev", - "wp-launchpad/launchpad-phpstan": "^0.0 || @dev", - "wp-launchpad/take-off": "^1.0 || @dev", + "wp-launchpad/build": "^3.1", + "wp-launchpad/cli": "^3.1", + "wp-launchpad/cli-installer": "^3.1", + "wp-launchpad/core": "^3.1", + "wp-launchpad/launchpad-phpstan": "^3.1", + "wp-launchpad/take-off": "^3.1", "wp-media/phpunit": "^3.0" }, "autoload": { diff --git a/packages/logger-take-off/composer.json b/packages/logger-take-off/composer.json index 0abf0e7..bb34303 100644 --- a/packages/logger-take-off/composer.json +++ b/packages/logger-take-off/composer.json @@ -1,51 +1,50 @@ { - "name": "wp-launchpad/logger-take-off", - "description": "Initialisation library for logger from Launchpad framework", - "minimum-stability": "dev", - "license": "proprietary", - "type": "library", - "authors": [ - { - "name": "coquardcyr", - "email": "coquardcyr@gmail.com" + "name": "wp-launchpad/logger-take-off", + "description": "Initialisation library for logger from Launchpad framework", + "license": "proprietary", + "type": "library", + "authors": [ + { + "name": "coquardcyr", + "email": "coquardcyr@gmail.com" + } + ], + "require": { + "wp-launchpad/cli": "^3.1", + "wp-launchpad/logger": "^3.1", + "ext-mbstring": "*", + "ext-json": "*", + "composer/composer": "^2.5" + }, + "require-dev": { + "phpunit/phpunit": "^7.5 || ^8 || ^9", + "wp-media/phpunit": "^3.0" + }, + "autoload": { + "psr-4": { + "LaunchpadLoggerTakeOff\\": "inc/" + } + }, + "autoload-dev": { + "psr-4": { + "LaunchpadLoggerTakeOff\\Tests\\": "tests/" + } + }, + "extra": { + "launchpad": { + "provider": "LaunchpadLoggerTakeOff\\ServiceProvider", + "command": "logger:initialize", + "install": true, + "clean": true, + "libraries": { + "crochetfeve0251/rocket-launcher-logger": "^0.0.2" + } + } + }, + "scripts": { + "test-integration": "\"vendor/bin/phpunit\" --testsuite integration --colors=always --configuration tests/Integration/phpunit.xml.dist", + "run-tests": [ + "@test-integration" + ] } - ], - "require": { - "wp-launchpad/cli": "1.0.*", - "wp-launchpad/logger": "0.0.*", - "ext-mbstring": "*", - "ext-json": "*", - "composer/composer": "^2.5" - }, - "require-dev": { - "phpunit/phpunit": "^7.5 || ^8 || ^9", - "wp-media/phpunit": "^3.0" - }, - "autoload": { - "psr-4": { - "LaunchpadLoggerTakeOff\\": "inc/" - } - }, - "autoload-dev": { - "psr-4": { - "LaunchpadLoggerTakeOff\\Tests\\": "tests/" - } - }, - "extra": { - "launchpad": { - "provider" : "LaunchpadLoggerTakeOff\\ServiceProvider", - "command": "logger:initialize", - "install": true, - "clean": true, - "libraries": { - "crochetfeve0251/rocket-launcher-logger": "^0.0.2" - } - } - }, - "scripts": { - "test-integration": "\"vendor/bin/phpunit\" --testsuite integration --colors=always --configuration tests/Integration/phpunit.xml.dist", - "run-tests": [ - "@test-integration" - ] - } } diff --git a/packages/logger/composer.json b/packages/logger/composer.json index bc92563..d1298f4 100644 --- a/packages/logger/composer.json +++ b/packages/logger/composer.json @@ -1,28 +1,27 @@ { - "name": "wp-launchpad/logger", - "minimum-stability": "dev", - "description": "Logger from Launchpad", - "keywords": [ - "wordpress" - ], - "license": "GPL-2.0-or-later", - "authors": [ - { - "name": "CrochetFeve0251" + "name": "wp-launchpad/logger", + "description": "Logger from Launchpad", + "keywords": [ + "wordpress" + ], + "license": "GPL-2.0-or-later", + "authors": [ + { + "name": "CrochetFeve0251" + } + ], + "autoload": { + "psr-4": { + "LaunchpadLogger\\": "inc/" + } + }, + "autoload-dev": { + "psr-4": { + "LaunchpadLogger\\Tests\\": "tests/" + } + }, + "require": { + "wp-launchpad/core": "^3.1", + "monolog/monolog": "^1.0 || ^2.0" } - ], - "autoload": { - "psr-4": { - "LaunchpadLogger\\": "inc/" - } - }, - "autoload-dev": { - "psr-4": { - "LaunchpadLogger\\Tests\\": "tests/" - } - }, - "require": { - "wp-launchpad/core": "^0.3 || @dev", - "monolog/monolog": "^1.0 || ^2.0" - } } diff --git a/packages/options/composer.json b/packages/options/composer.json index 8905a25..dae65c2 100644 --- a/packages/options/composer.json +++ b/packages/options/composer.json @@ -1,31 +1,31 @@ { - "name": "wp-launchpad/options", - "description": "Options library for Launchpad", - "autoload": { - "psr-4": { - "LaunchpadOptions\\": "inc/" + "name": "wp-launchpad/options", + "description": "Options library for Launchpad", + "autoload": { + "psr-4": { + "LaunchpadOptions\\": "inc/" + } + }, + "autoload-dev": { + "psr-4": { + "LaunchpadOptions\\Tests\\": "tests/" + } + }, + "require": { + "php": ">=7.0" + }, + "require-dev": { + "wp-coding-standards/wpcs": "^3", + "phpcompatibility/phpcompatibility-wp": "^2.0", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0" + }, + "scripts": { + "phpcs": "phpcs --basepath=.", + "phpcs:fix": "phpcbf" + }, + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + } } - }, - "autoload-dev": { - "psr-4": { - "LaunchpadOptions\\Tests\\": "tests/" - } - }, - "require": { - "php": ">=7.0" - }, - "require-dev": { - "wp-coding-standards/wpcs": "^3", - "phpcompatibility/phpcompatibility-wp": "^2.0", - "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0" - }, - "scripts": { - "phpcs": "phpcs --basepath=.", - "phpcs:fix": "phpcbf" - }, - "config": { - "allow-plugins": { - "dealerdirect/phpcodesniffer-composer-installer": true - } - } -} \ No newline at end of file +} diff --git a/packages/phpunit-wp-hooks/composer.json b/packages/phpunit-wp-hooks/composer.json index de97c4e..888b208 100644 --- a/packages/phpunit-wp-hooks/composer.json +++ b/packages/phpunit-wp-hooks/composer.json @@ -1,44 +1,51 @@ { - "name": "wp-launchpad/phpunit-wp-hooks", - "description": "Custom annotations to mock WP hooks for PHPUnit.", - "keywords": ["phpunit", "annotations", "extensions", "hooks", "wordpress", "custom"], - "type": "library", - "license": "MIT", - "authors": [ - { - "name": "CrochetFeve0251" - } - ], - "require": { - "php": "^7.1|^8", - "phpunit/phpunit": "^7.1|^8|^9" - }, - "autoload": { - "psr-4": { - "WPLaunchpadPHPUnitWPHooks\\": "src/" - } - }, - "autoload-dev": { - "psr-4": { - "WPLaunchpadPHPUnitWPHooks\\Tests\\": "tests/" - } - }, - "config": { - "preferred-install": { - "*": "dist" + "name": "wp-launchpad/phpunit-wp-hooks", + "description": "Custom annotations to mock WP hooks for PHPUnit.", + "keywords": [ + "phpunit", + "annotations", + "extensions", + "hooks", + "wordpress", + "custom" + ], + "type": "library", + "license": "MIT", + "authors": [ + { + "name": "CrochetFeve0251" + } + ], + "require": { + "php": "^7.1|^8", + "phpunit/phpunit": "^7.1|^8|^9" + }, + "autoload": { + "psr-4": { + "WPLaunchpadPHPUnitWPHooks\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "WPLaunchpadPHPUnitWPHooks\\Tests\\": "tests/" + } + }, + "config": { + "preferred-install": { + "*": "dist" + }, + "sort-packages": true, + "allow-plugins": { + "ocramius/package-versions": true + } + }, + "require-dev": { + "wp-media/phpunit": "^3.0" }, - "sort-packages": true, - "allow-plugins": { - "ocramius/package-versions": true + "scripts": { + "test-unit": "\"vendor/bin/phpunit\" --colors=always --configuration phpunit.xml", + "run-tests": [ + "@test-unit" + ] } - }, - "require-dev": { - "wp-media/phpunit": "^3.0" - }, - "scripts": { - "test-unit": "\"vendor/bin/phpunit\" --colors=always --configuration phpunit.xml", - "run-tests": [ - "@test-unit" - ] - } } diff --git a/packages/renderer-take-off/composer.json b/packages/renderer-take-off/composer.json index 689e826..109ebca 100644 --- a/packages/renderer-take-off/composer.json +++ b/packages/renderer-take-off/composer.json @@ -1,40 +1,39 @@ { - "name": "wp-launchpad/renderer-take-off", - "minimum-stability": "dev", - "description": "Initialisation library for the renderer library from the Launchpad framework", - "require": { - "wp-launchpad/cli": "^1.0.1", - "wp-launchpad/renderer": "^1.0" - }, - "autoload": { - "psr-4": { - "LaunchpadRendererTakeOff\\": "inc/" + "name": "wp-launchpad/renderer-take-off", + "description": "Initialisation library for the renderer library from the Launchpad framework", + "require": { + "wp-launchpad/cli": "^3.1", + "wp-launchpad/renderer": "^3.1" + }, + "autoload": { + "psr-4": { + "LaunchpadRendererTakeOff\\": "inc/" + } + }, + "require-dev": { + "phpunit/phpunit": "^7.5 || ^8 || ^9", + "wp-media/phpunit": "^3.0" + }, + "autoload-dev": { + "psr-4": { + "LaunchpadRendererTakeOff\\Tests\\": "tests/" + } + }, + "extra": { + "launchpad": { + "provider": "LaunchpadRendererTakeOff\\ServiceProvider", + "command": "renderer:install", + "install": true, + "clean": true, + "libraries": { + "wp-launchpad/renderer": "^1.3" + } + } + }, + "scripts": { + "test-integration": "\"vendor/bin/phpunit\" --testsuite integration --colors=always --configuration tests/Integration/phpunit.xml.dist", + "run-tests": [ + "@test-integration" + ] } - }, - "require-dev": { - "phpunit/phpunit": "^7.5 || ^8 || ^9", - "wp-media/phpunit": "^3.0" - }, - "autoload-dev": { - "psr-4": { - "LaunchpadRendererTakeOff\\Tests\\": "tests/" - } - }, - "extra": { - "launchpad": { - "provider" : "LaunchpadRendererTakeOff\\ServiceProvider", - "command": "renderer:install", - "install": true, - "clean": true, - "libraries": { - "wp-launchpad/renderer": "^1.3" - } - } - }, - "scripts": { - "test-integration": "\"vendor/bin/phpunit\" --testsuite integration --colors=always --configuration tests/Integration/phpunit.xml.dist", - "run-tests": [ - "@test-integration" - ] - } } diff --git a/packages/renderer/composer.json b/packages/renderer/composer.json index 3c7ba9b..7a6dc63 100644 --- a/packages/renderer/composer.json +++ b/packages/renderer/composer.json @@ -1,46 +1,45 @@ { - "name": "wp-launchpad/renderer", - "minimum-stability": "dev", - "description": "Renderer library for Launchpad framework", - "license": "proprietary", - "type": "library", - "authors": [ - { - "name": "coquardcyr", - "email": "coquardcyr@gmail.com" + "name": "wp-launchpad/renderer", + "description": "Renderer library for Launchpad framework", + "license": "proprietary", + "type": "library", + "authors": [ + { + "name": "coquardcyr", + "email": "coquardcyr@gmail.com" + } + ], + "require": { + "wp-launchpad/core": "^3.1", + "wp-launchpad/filesystem": "^3.1", + "psr/simple-cache": "^1.0", + "league/plates": "^3.5" + }, + "require-dev": { + "phpunit/phpunit": "^7.5 || ^8 || ^9", + "wp-media/phpunit": "^3.0" + }, + "autoload": { + "psr-4": { + "LaunchpadRenderer\\": "inc/" + } + }, + "autoload-dev": { + "psr-4": { + "LaunchpadRenderer\\Tests\\": "tests/" + } + }, + "config": { + "allow-plugins": { + "composer/installers": true + } + }, + "scripts": { + "test-unit": "\"vendor/bin/phpunit\" --testsuite unit --colors=always --configuration tests/Unit/phpunit.xml.dist", + "test-integration": "\"vendor/bin/phpunit\" --testsuite integration --colors=always --configuration tests/Integration/phpunit.xml.dist", + "run-tests": [ + "@test-unit", + "@test-integration" + ] } - ], - "require": { - "wp-launchpad/core": "^0.3 || @dev", - "wp-launchpad/filesystem": "v0.0.3 || @dev", - "psr/simple-cache": "^1.0", - "league/plates": "^3.5" - }, - "require-dev": { - "phpunit/phpunit": "^7.5 || ^8 || ^9", - "wp-media/phpunit": "^3.0" - }, - "autoload": { - "psr-4": { - "LaunchpadRenderer\\": "inc/" - } - }, - "autoload-dev": { - "psr-4": { - "LaunchpadRenderer\\Tests\\": "tests/" - } - }, - "config": { - "allow-plugins": { - "composer/installers": true - } - }, - "scripts": { - "test-unit": "\"vendor/bin/phpunit\" --testsuite unit --colors=always --configuration tests/Unit/phpunit.xml.dist", - "test-integration": "\"vendor/bin/phpunit\" --testsuite integration --colors=always --configuration tests/Integration/phpunit.xml.dist", - "run-tests": [ - "@test-unit", - "@test-integration" - ] - } } diff --git a/packages/renderer/tests/Integration/.phpunit.result.cache b/packages/renderer/tests/Integration/.phpunit.result.cache index 81d2b7f..63f3bd6 100644 --- a/packages/renderer/tests/Integration/.phpunit.result.cache +++ b/packages/renderer/tests/Integration/.phpunit.result.cache @@ -1 +1 @@ -{"version":1,"defects":{"LaunchpadRenderer\\Tests\\Integration\\inc\\Subscriber\\Test_clear::testShouldDoAsExpected with data set \"launchpad_clean_all_templatesShouldClean\"":3,"LaunchpadRenderer\\Tests\\Integration\\inc\\Subscriber\\Test_clear::testShouldDoAsExpected with data set \"prefix_clean_all_templatesShouldClean\"":3,"LaunchpadRenderer\\Tests\\Integration\\inc\\Subscriber\\Test_delete::testShouldDoAsExpected with data set \"ExistingShouldClean\"":3,"LaunchpadRenderer\\Tests\\Integration\\inc\\Subscriber\\Test_has::testShouldReturnAsExpected with data set \"noCacheShouldReturnFalse\"":3,"LaunchpadRenderer\\Tests\\Integration\\inc\\Subscriber\\Test_has::testShouldReturnAsExpected with data set \"CacheShouldReturnTrue\"":3,"LaunchpadRenderer\\Tests\\Integration\\inc\\Subscriber\\Test_render::testShouldDoAsExpected with data set \"ShouldRenderAndCreateCacheWhenNoCache\"":3,"LaunchpadRenderer\\Tests\\Integration\\inc\\Subscriber\\Test_render::testShouldDoAsExpected with data set \"ShouldPrintCacheWhenCache\"":3},"times":{"LaunchpadRenderer\\Tests\\Integration\\inc\\Subscriber\\Test_clear::testShouldDoAsExpected with data set \"launchpad_clean_all_templatesShouldClean\"":0.12,"LaunchpadRenderer\\Tests\\Integration\\inc\\Subscriber\\Test_clear::testShouldDoAsExpected with data set \"prefix_clean_all_templatesShouldClean\"":0.003,"LaunchpadRenderer\\Tests\\Integration\\inc\\Subscriber\\Test_delete::testShouldDoAsExpected with data set \"NotExistShouldDoNothing\"":0.006,"LaunchpadRenderer\\Tests\\Integration\\inc\\Subscriber\\Test_delete::testShouldDoAsExpected with data set \"ExistingShouldClean\"":0.003,"LaunchpadRenderer\\Tests\\Integration\\inc\\Subscriber\\Test_has::testShouldReturnAsExpected with data set \"noCacheShouldReturnFalse\"":0.002,"LaunchpadRenderer\\Tests\\Integration\\inc\\Subscriber\\Test_has::testShouldReturnAsExpected with data set \"CacheShouldReturnTrue\"":0.002,"LaunchpadRenderer\\Tests\\Integration\\inc\\Subscriber\\Test_render::testShouldDoAsExpected with data set \"ShouldRenderAndCreateCacheWhenNoCache\"":0.012,"LaunchpadRenderer\\Tests\\Integration\\inc\\Subscriber\\Test_render::testShouldDoAsExpected with data set \"ShouldPrintCacheWhenCache\"":0.003}} \ No newline at end of file +{"version":1,"defects":{"LaunchpadRenderer\\Tests\\Integration\\inc\\Subscriber\\Test_clear::testShouldDoAsExpected with data set \"launchpad_clean_all_templatesShouldClean\"":3,"LaunchpadRenderer\\Tests\\Integration\\inc\\Subscriber\\Test_clear::testShouldDoAsExpected with data set \"prefix_clean_all_templatesShouldClean\"":3,"LaunchpadRenderer\\Tests\\Integration\\inc\\Subscriber\\Test_delete::testShouldDoAsExpected with data set \"ExistingShouldClean\"":3,"LaunchpadRenderer\\Tests\\Integration\\inc\\Subscriber\\Test_has::testShouldReturnAsExpected with data set \"noCacheShouldReturnFalse\"":3,"LaunchpadRenderer\\Tests\\Integration\\inc\\Subscriber\\Test_has::testShouldReturnAsExpected with data set \"CacheShouldReturnTrue\"":3,"LaunchpadRenderer\\Tests\\Integration\\inc\\Subscriber\\Test_render::testShouldDoAsExpected with data set \"ShouldRenderAndCreateCacheWhenNoCache\"":5,"LaunchpadRenderer\\Tests\\Integration\\inc\\Subscriber\\Test_render::testShouldDoAsExpected with data set \"ShouldPrintCacheWhenCache\"":5},"times":{"LaunchpadRenderer\\Tests\\Integration\\inc\\Subscriber\\Test_clear::testShouldDoAsExpected with data set \"launchpad_clean_all_templatesShouldClean\"":2.479,"LaunchpadRenderer\\Tests\\Integration\\inc\\Subscriber\\Test_clear::testShouldDoAsExpected with data set \"prefix_clean_all_templatesShouldClean\"":0.054,"LaunchpadRenderer\\Tests\\Integration\\inc\\Subscriber\\Test_delete::testShouldDoAsExpected with data set \"NotExistShouldDoNothing\"":0.111,"LaunchpadRenderer\\Tests\\Integration\\inc\\Subscriber\\Test_delete::testShouldDoAsExpected with data set \"ExistingShouldClean\"":0.046,"LaunchpadRenderer\\Tests\\Integration\\inc\\Subscriber\\Test_has::testShouldReturnAsExpected with data set \"noCacheShouldReturnFalse\"":0.031,"LaunchpadRenderer\\Tests\\Integration\\inc\\Subscriber\\Test_has::testShouldReturnAsExpected with data set \"CacheShouldReturnTrue\"":0.038,"LaunchpadRenderer\\Tests\\Integration\\inc\\Subscriber\\Test_render::testShouldDoAsExpected with data set \"ShouldRenderAndCreateCacheWhenNoCache\"":0.189,"LaunchpadRenderer\\Tests\\Integration\\inc\\Subscriber\\Test_render::testShouldDoAsExpected with data set \"ShouldPrintCacheWhenCache\"":0.04}} \ No newline at end of file diff --git a/packages/renderer/tests/Integration/test.php b/packages/renderer/tests/Integration/test.php index b996f58..c19e23c 100644 --- a/packages/renderer/tests/Integration/test.php +++ b/packages/renderer/tests/Integration/test.php @@ -31,7 +31,7 @@ $wp_rocket = new Plugin( $container, new EventManager(), - new SubscriberWrapper( $prefix ), + new SubscriberWrapper( $prefix, $container ), new Dispatcher() ); diff --git a/packages/renderer/tests/Unit/.phpunit.result.cache b/packages/renderer/tests/Unit/.phpunit.result.cache index 3919477..94027ff 100644 --- a/packages/renderer/tests/Unit/.phpunit.result.cache +++ b/packages/renderer/tests/Unit/.phpunit.result.cache @@ -1 +1 @@ -{"version":1,"defects":{"LaunchpadRenderer\\Tests\\Unit\\inc\\Renderer\\Renderer\\Test_render::testShouldReturnAsExpected":3,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_delete::testShouldDoAsExpected":4,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_has::testShouldReturnAsExpected":4,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_render::testShouldReturnAsExpected":3,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_has::testShouldReturnAsExpected with data set \"cacheDisabledShouldReturnFalse\"":3,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_has::testShouldReturnAsExpected with data set \"cacheEnabledAndHitShouldReturnTrue\"":3,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_has::testShouldReturnAsExpected with data set \"cacheEnabledWithoutHitShouldReturnFalse\"":3,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_delete::testShouldDoAsExpected with data set \"shouldDelete\"":4,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_render::testShouldReturnAsExpected with data set \"onCacheWithHitShouldReturnCachedContent\"":4},"times":{"LaunchpadRenderer\\Tests\\Unit\\inc\\Renderer\\Renderer\\Test_render::testShouldReturnAsExpected":0.094,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_clear::testShouldDoAsExpected":0.027,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_delete::testShouldDoAsExpected":0.002,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_getSubscribedEvents::testShouldReturnAsExpected with data set \"shouldReturnEvents\"":0.001,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_has::testShouldReturnAsExpected":0.001,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_render::testShouldReturnAsExpected":0.001,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_has::testShouldReturnAsExpected with data set \"cacheDisabledShouldReturnFalse\"":0.001,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_has::testShouldReturnAsExpected with data set \"cacheEnabledAndHitShouldReturnTrue\"":0.001,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_has::testShouldReturnAsExpected with data set \"cacheEnabledWithoutHitShouldReturnFalse\"":0.001,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_delete::testShouldDoAsExpected with data set \"shouldDelete\"":0.013,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_render::testShouldReturnAsExpected with data set \"onNoCacheShouldReturnContent\"":0.001,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_render::testShouldReturnAsExpected with data set \"onCacheWithHitShouldReturnCachedContent\"":0.001,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_render::testShouldReturnAsExpected with data set \"onCacheWithoutHitShouldReturnContent\"":0.001}} \ No newline at end of file +{"version":1,"defects":{"LaunchpadRenderer\\Tests\\Unit\\inc\\Renderer\\Renderer\\Test_render::testShouldReturnAsExpected":3,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_delete::testShouldDoAsExpected":4,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_has::testShouldReturnAsExpected":4,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_render::testShouldReturnAsExpected":3,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_has::testShouldReturnAsExpected with data set \"cacheDisabledShouldReturnFalse\"":3,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_has::testShouldReturnAsExpected with data set \"cacheEnabledAndHitShouldReturnTrue\"":3,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_has::testShouldReturnAsExpected with data set \"cacheEnabledWithoutHitShouldReturnFalse\"":3,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_delete::testShouldDoAsExpected with data set \"shouldDelete\"":4,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_render::testShouldReturnAsExpected with data set \"onCacheWithHitShouldReturnCachedContent\"":4},"times":{"LaunchpadRenderer\\Tests\\Unit\\inc\\Renderer\\Renderer\\Test_render::testShouldReturnAsExpected":1.457,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_clear::testShouldDoAsExpected":1.109,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_delete::testShouldDoAsExpected":0.002,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_getSubscribedEvents::testShouldReturnAsExpected with data set \"shouldReturnEvents\"":0.013,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_has::testShouldReturnAsExpected":0.001,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_render::testShouldReturnAsExpected":0.001,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_has::testShouldReturnAsExpected with data set \"cacheDisabledShouldReturnFalse\"":0.028,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_has::testShouldReturnAsExpected with data set \"cacheEnabledAndHitShouldReturnTrue\"":0.04,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_has::testShouldReturnAsExpected with data set \"cacheEnabledWithoutHitShouldReturnFalse\"":0.041,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_delete::testShouldDoAsExpected with data set \"shouldDelete\"":0.753,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_render::testShouldReturnAsExpected with data set \"onNoCacheShouldReturnContent\"":0.05,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_render::testShouldReturnAsExpected with data set \"onCacheWithHitShouldReturnCachedContent\"":0.05,"LaunchpadRenderer\\Tests\\Unit\\inc\\Subscriber\\Test_render::testShouldReturnAsExpected with data set \"onCacheWithoutHitShouldReturnContent\"":0.055,"LaunchpadRenderer\\Tests\\Unit\\inc\\Cache\\WPFilesystemCache\\Test_clear::testShouldDoAsExpected with data set \"shouldDeleteRootFolder\"":3.046,"LaunchpadRenderer\\Tests\\Unit\\inc\\Cache\\WPFilesystemCache\\Test_delete::testShouldDoAsExpected with data set \"shouldDeletePath\"":0.011,"LaunchpadRenderer\\Tests\\Unit\\inc\\Cache\\WPFilesystemCache\\Test_deleteMultiple::testShouldDoAsExpected":0.309,"LaunchpadRenderer\\Tests\\Unit\\inc\\Cache\\WPFilesystemCache\\Test_get::testShouldReturnAsExpected with data set \"doesNotExistsShouldReturnDefault\"":0.097,"LaunchpadRenderer\\Tests\\Unit\\inc\\Cache\\WPFilesystemCache\\Test_get::testShouldReturnAsExpected with data set \"existsShouldReturnValue\"":0.019,"LaunchpadRenderer\\Tests\\Unit\\inc\\Cache\\WPFilesystemCache\\Test_getMultiple::testShouldReturnAsExpected with data set \"getShouldReturnValues\"":0.312,"LaunchpadRenderer\\Tests\\Unit\\inc\\Cache\\WPFilesystemCache\\Test_has::testShouldReturnAsExpected with data set \"shouldReturnResult\"":0.012,"LaunchpadRenderer\\Tests\\Unit\\inc\\Cache\\WPFilesystemCache\\Test_set::testShouldDoAsExpected with data set \"shouldSetTheValue\"":0.015,"LaunchpadRenderer\\Tests\\Unit\\inc\\Cache\\WPFilesystemCache\\Test_setMultiple::testShouldDoAsExpected":0.312}} \ No newline at end of file diff --git a/packages/take-off/composer.json b/packages/take-off/composer.json index 61bb956..d83c8f9 100644 --- a/packages/take-off/composer.json +++ b/packages/take-off/composer.json @@ -1,7 +1,6 @@ { "name": "wp-launchpad/take-off", "description": "Initialisation library for Launchpad", - "minimum-stability": "stable", "license": "proprietary", "type": "library", "authors": [ @@ -11,7 +10,7 @@ } ], "require": { - "wp-launchpad/cli": "^1.0.1 || @dev", + "wp-launchpad/cli": "^3.1", "ext-mbstring": "*", "ext-json": "*", "composer/composer": "^2.5", diff --git a/packages/take-off/composer.lock b/packages/take-off/composer.lock index 053246a..93e56ff 100644 --- a/packages/take-off/composer.lock +++ b/packages/take-off/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "05cf30a945a57567d4a955237805efbd", + "content-hash": "aad9a0c16c9bdc17e620da159e5ce504", "packages": [ { "name": "adhocore/cli", @@ -138,16 +138,16 @@ }, { "name": "composer/ca-bundle", - "version": "1.5.2", + "version": "1.5.4", "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "48a792895a2b7a6ee65dd5442c299d7b835b6137" + "reference": "bc0593537a463e55cadf45fd938d23b75095b7e1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/48a792895a2b7a6ee65dd5442c299d7b835b6137", - "reference": "48a792895a2b7a6ee65dd5442c299d7b835b6137", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/bc0593537a463e55cadf45fd938d23b75095b7e1", + "reference": "bc0593537a463e55cadf45fd938d23b75095b7e1", "shasum": "" }, "require": { @@ -194,7 +194,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/ca-bundle/issues", - "source": "https://github.com/composer/ca-bundle/tree/1.5.2" + "source": "https://github.com/composer/ca-bundle/tree/1.5.4" }, "funding": [ { @@ -210,20 +210,20 @@ "type": "tidelift" } ], - "time": "2024-09-25T07:49:53+00:00" + "time": "2024-11-27T15:35:25+00:00" }, { "name": "composer/class-map-generator", - "version": "1.4.0", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/composer/class-map-generator.git", - "reference": "98bbf6780e56e0fd2404fe4b82eb665a0f93b783" + "reference": "4b0a223cf5be7c9ee7e0ef1bc7db42b4a97c9915" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/class-map-generator/zipball/98bbf6780e56e0fd2404fe4b82eb665a0f93b783", - "reference": "98bbf6780e56e0fd2404fe4b82eb665a0f93b783", + "url": "https://api.github.com/repos/composer/class-map-generator/zipball/4b0a223cf5be7c9ee7e0ef1bc7db42b4a97c9915", + "reference": "4b0a223cf5be7c9ee7e0ef1bc7db42b4a97c9915", "shasum": "" }, "require": { @@ -232,10 +232,10 @@ "symfony/finder": "^4.4 || ^5.3 || ^6 || ^7" }, "require-dev": { - "phpstan/phpstan": "^1.6", - "phpstan/phpstan-deprecation-rules": "^1", - "phpstan/phpstan-phpunit": "^1", - "phpstan/phpstan-strict-rules": "^1.1", + "phpstan/phpstan": "^1.12 || ^2", + "phpstan/phpstan-deprecation-rules": "^1 || ^2", + "phpstan/phpstan-phpunit": "^1 || ^2", + "phpstan/phpstan-strict-rules": "^1.1 || ^2", "phpunit/phpunit": "^8", "symfony/filesystem": "^5.4 || ^6" }, @@ -267,7 +267,7 @@ ], "support": { "issues": "https://github.com/composer/class-map-generator/issues", - "source": "https://github.com/composer/class-map-generator/tree/1.4.0" + "source": "https://github.com/composer/class-map-generator/tree/1.5.0" }, "funding": [ { @@ -283,20 +283,20 @@ "type": "tidelift" } ], - "time": "2024-10-03T18:14:00+00:00" + "time": "2024-11-25T16:11:06+00:00" }, { "name": "composer/composer", - "version": "2.8.1", + "version": "2.8.4", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "e52b8672276cf436670cdd6bd5de4353740e83b2" + "reference": "112e37d1dca22b3fdb81cf3524ab4994f47fdb8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/e52b8672276cf436670cdd6bd5de4353740e83b2", - "reference": "e52b8672276cf436670cdd6bd5de4353740e83b2", + "url": "https://api.github.com/repos/composer/composer/zipball/112e37d1dca22b3fdb81cf3524ab4994f47fdb8c", + "reference": "112e37d1dca22b3fdb81cf3524ab4994f47fdb8c", "shasum": "" }, "require": { @@ -310,7 +310,7 @@ "justinrainbow/json-schema": "^5.3", "php": "^7.2.5 || ^8.0", "psr/log": "^1.0 || ^2.0 || ^3.0", - "react/promise": "^3.2", + "react/promise": "^2.11 || ^3.2", "seld/jsonlint": "^1.4", "seld/phar-utils": "^1.2", "seld/signal-handler": "^2.0", @@ -340,13 +340,13 @@ ], "type": "library", "extra": { - "branch-alias": { - "dev-main": "2.8-dev" - }, "phpstan": { "includes": [ "phpstan/rules.neon" ] + }, + "branch-alias": { + "dev-main": "2.8-dev" } }, "autoload": { @@ -381,7 +381,7 @@ "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/composer/issues", "security": "https://github.com/composer/composer/security/policy", - "source": "https://github.com/composer/composer/tree/2.8.1" + "source": "https://github.com/composer/composer/tree/2.8.4" }, "funding": [ { @@ -397,7 +397,7 @@ "type": "tidelift" } ], - "time": "2024-10-04T09:31:01+00:00" + "time": "2024-12-11T10:57:47+00:00" }, { "name": "composer/metadata-minifier", @@ -470,16 +470,16 @@ }, { "name": "composer/pcre", - "version": "3.3.1", + "version": "3.3.2", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "63aaeac21d7e775ff9bc9d45021e1745c97521c4" + "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/63aaeac21d7e775ff9bc9d45021e1745c97521c4", - "reference": "63aaeac21d7e775ff9bc9d45021e1745c97521c4", + "url": "https://api.github.com/repos/composer/pcre/zipball/b2bed4734f0cc156ee1fe9c0da2550420d99a21e", + "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e", "shasum": "" }, "require": { @@ -489,8 +489,8 @@ "phpstan/phpstan": "<1.11.10" }, "require-dev": { - "phpstan/phpstan": "^1.11.10", - "phpstan/phpstan-strict-rules": "^1.1", + "phpstan/phpstan": "^1.12 || ^2", + "phpstan/phpstan-strict-rules": "^1 || ^2", "phpunit/phpunit": "^8 || ^9" }, "type": "library", @@ -529,7 +529,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.3.1" + "source": "https://github.com/composer/pcre/tree/3.3.2" }, "funding": [ { @@ -545,7 +545,7 @@ "type": "tidelift" } ], - "time": "2024-08-27T18:44:43+00:00" + "time": "2024-11-12T16:29:46+00:00" }, { "name": "composer/semver", @@ -1739,16 +1739,16 @@ }, { "name": "symfony/cache", - "version": "v7.1.5", + "version": "v7.2.1", "source": { "type": "git", "url": "https://github.com/symfony/cache.git", - "reference": "86e5296b10e4dec8c8441056ca606aedb8a3be0a" + "reference": "e7e983596b744c4539f31e79b0350a6cf5878a20" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/86e5296b10e4dec8c8441056ca606aedb8a3be0a", - "reference": "86e5296b10e4dec8c8441056ca606aedb8a3be0a", + "url": "https://api.github.com/repos/symfony/cache/zipball/e7e983596b744c4539f31e79b0350a6cf5878a20", + "reference": "e7e983596b744c4539f31e79b0350a6cf5878a20", "shasum": "" }, "require": { @@ -1776,6 +1776,7 @@ "doctrine/dbal": "^3.6|^4", "predis/predis": "^1.1|^2.0", "psr/simple-cache": "^1.0|^2.0|^3.0", + "symfony/clock": "^6.4|^7.0", "symfony/config": "^6.4|^7.0", "symfony/dependency-injection": "^6.4|^7.0", "symfony/filesystem": "^6.4|^7.0", @@ -1816,7 +1817,7 @@ "psr6" ], "support": { - "source": "https://github.com/symfony/cache/tree/v7.1.5" + "source": "https://github.com/symfony/cache/tree/v7.2.1" }, "funding": [ { @@ -1832,20 +1833,20 @@ "type": "tidelift" } ], - "time": "2024-09-17T09:16:35+00:00" + "time": "2024-12-07T08:08:50+00:00" }, { "name": "symfony/cache-contracts", - "version": "v3.5.0", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/symfony/cache-contracts.git", - "reference": "df6a1a44c890faded49a5fca33c2d5c5fd3c2197" + "reference": "15a4f8e5cd3bce9aeafc882b1acab39ec8de2c1b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/df6a1a44c890faded49a5fca33c2d5c5fd3c2197", - "reference": "df6a1a44c890faded49a5fca33c2d5c5fd3c2197", + "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/15a4f8e5cd3bce9aeafc882b1acab39ec8de2c1b", + "reference": "15a4f8e5cd3bce9aeafc882b1acab39ec8de2c1b", "shasum": "" }, "require": { @@ -1892,7 +1893,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/cache-contracts/tree/v3.5.0" + "source": "https://github.com/symfony/cache-contracts/tree/v3.5.1" }, "funding": [ { @@ -1908,20 +1909,20 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:32:20+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/console", - "version": "v6.4.12", + "version": "v6.4.15", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "72d080eb9edf80e36c19be61f72c98ed8273b765" + "reference": "f1fc6f47283e27336e7cebb9e8946c8de7bff9bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/72d080eb9edf80e36c19be61f72c98ed8273b765", - "reference": "72d080eb9edf80e36c19be61f72c98ed8273b765", + "url": "https://api.github.com/repos/symfony/console/zipball/f1fc6f47283e27336e7cebb9e8946c8de7bff9bd", + "reference": "f1fc6f47283e27336e7cebb9e8946c8de7bff9bd", "shasum": "" }, "require": { @@ -1986,7 +1987,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.12" + "source": "https://github.com/symfony/console/tree/v6.4.15" }, "funding": [ { @@ -2002,20 +2003,20 @@ "type": "tidelift" } ], - "time": "2024-09-20T08:15:52+00:00" + "time": "2024-11-06T14:19:14+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.5.0", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1" + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", - "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", "shasum": "" }, "require": { @@ -2053,7 +2054,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1" }, "funding": [ { @@ -2069,20 +2070,20 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:32:20+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/filesystem", - "version": "v7.1.5", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "61fe0566189bf32e8cfee78335d8776f64a66f5a" + "reference": "b8dce482de9d7c9fe2891155035a7248ab5c7fdb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/61fe0566189bf32e8cfee78335d8776f64a66f5a", - "reference": "61fe0566189bf32e8cfee78335d8776f64a66f5a", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/b8dce482de9d7c9fe2891155035a7248ab5c7fdb", + "reference": "b8dce482de9d7c9fe2891155035a7248ab5c7fdb", "shasum": "" }, "require": { @@ -2119,7 +2120,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v7.1.5" + "source": "https://github.com/symfony/filesystem/tree/v7.2.0" }, "funding": [ { @@ -2135,20 +2136,20 @@ "type": "tidelift" } ], - "time": "2024-09-17T09:16:35+00:00" + "time": "2024-10-25T15:15:23+00:00" }, { "name": "symfony/finder", - "version": "v6.4.11", + "version": "v6.4.13", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "d7eb6daf8cd7e9ac4976e9576b32042ef7253453" + "reference": "daea9eca0b08d0ed1dc9ab702a46128fd1be4958" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/d7eb6daf8cd7e9ac4976e9576b32042ef7253453", - "reference": "d7eb6daf8cd7e9ac4976e9576b32042ef7253453", + "url": "https://api.github.com/repos/symfony/finder/zipball/daea9eca0b08d0ed1dc9ab702a46128fd1be4958", + "reference": "daea9eca0b08d0ed1dc9ab702a46128fd1be4958", "shasum": "" }, "require": { @@ -2183,7 +2184,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.4.11" + "source": "https://github.com/symfony/finder/tree/v6.4.13" }, "funding": [ { @@ -2199,7 +2200,7 @@ "type": "tidelift" } ], - "time": "2024-08-13T14:27:37+00:00" + "time": "2024-10-01T08:30:56+00:00" }, { "name": "symfony/polyfill-ctype", @@ -2227,8 +2228,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -2303,8 +2304,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -2381,8 +2382,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -2465,8 +2466,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -2539,8 +2540,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -2615,8 +2616,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -2695,8 +2696,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -2753,16 +2754,16 @@ }, { "name": "symfony/process", - "version": "v7.1.5", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "5c03ee6369281177f07f7c68252a280beccba847" + "reference": "d34b22ba9390ec19d2dd966c40aa9e8462f27a7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/5c03ee6369281177f07f7c68252a280beccba847", - "reference": "5c03ee6369281177f07f7c68252a280beccba847", + "url": "https://api.github.com/repos/symfony/process/zipball/d34b22ba9390ec19d2dd966c40aa9e8462f27a7e", + "reference": "d34b22ba9390ec19d2dd966c40aa9e8462f27a7e", "shasum": "" }, "require": { @@ -2794,7 +2795,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.1.5" + "source": "https://github.com/symfony/process/tree/v7.2.0" }, "funding": [ { @@ -2810,20 +2811,20 @@ "type": "tidelift" } ], - "time": "2024-09-19T21:48:23+00:00" + "time": "2024-11-06T14:24:19+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.5.0", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "bd1d9e59a81d8fa4acdcea3f617c581f7475a80f" + "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/bd1d9e59a81d8fa4acdcea3f617c581f7475a80f", - "reference": "bd1d9e59a81d8fa4acdcea3f617c581f7475a80f", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/e53260aabf78fb3d63f8d79d69ece59f80d5eda0", + "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0", "shasum": "" }, "require": { @@ -2877,7 +2878,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.5.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.5.1" }, "funding": [ { @@ -2893,20 +2894,20 @@ "type": "tidelift" } ], - "time": "2024-04-18T09:32:20+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/string", - "version": "v7.1.5", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "d66f9c343fa894ec2037cc928381df90a7ad4306" + "reference": "446e0d146f991dde3e73f45f2c97a9faad773c82" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/d66f9c343fa894ec2037cc928381df90a7ad4306", - "reference": "d66f9c343fa894ec2037cc928381df90a7ad4306", + "url": "https://api.github.com/repos/symfony/string/zipball/446e0d146f991dde3e73f45f2c97a9faad773c82", + "reference": "446e0d146f991dde3e73f45f2c97a9faad773c82", "shasum": "" }, "require": { @@ -2964,7 +2965,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v7.1.5" + "source": "https://github.com/symfony/string/tree/v7.2.0" }, "funding": [ { @@ -2980,20 +2981,20 @@ "type": "tidelift" } ], - "time": "2024-09-20T08:28:38+00:00" + "time": "2024-11-13T13:31:26+00:00" }, { "name": "symfony/var-exporter", - "version": "v7.1.2", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/var-exporter.git", - "reference": "b80a669a2264609f07f1667f891dbfca25eba44c" + "reference": "1a6a89f95a46af0f142874c9d650a6358d13070d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/b80a669a2264609f07f1667f891dbfca25eba44c", - "reference": "b80a669a2264609f07f1667f891dbfca25eba44c", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/1a6a89f95a46af0f142874c9d650a6358d13070d", + "reference": "1a6a89f95a46af0f142874c9d650a6358d13070d", "shasum": "" }, "require": { @@ -3040,7 +3041,7 @@ "serialize" ], "support": { - "source": "https://github.com/symfony/var-exporter/tree/v7.1.2" + "source": "https://github.com/symfony/var-exporter/tree/v7.2.0" }, "funding": [ { @@ -3056,15 +3057,15 @@ "type": "tidelift" } ], - "time": "2024-06-28T08:00:31+00:00" + "time": "2024-10-18T07:58:17+00:00" }, { "name": "wp-launchpad/cli", - "version": "dev-first-base", + "version": "3.1.x-dev", "dist": { "type": "path", - "url": "/home/cyrille/launchpad-develop/././packages/cli", - "reference": "1b5205e74aab3c58c2b1cac157251f985348df3c" + "url": "/home/cyrille/launchpad-develop/./packages/cli", + "reference": "c33f10a666aa55631ece129bd2e8203f6c086332" }, "require": { "adhocore/cli": "^v0.9.0", @@ -3079,6 +3080,11 @@ "wp-media/phpunit": "^3.0" }, "type": "library", + "extra": { + "branch-alias": { + "feature/ll-subscribers": "3.1-dev" + } + }, "autoload": { "psr-4": { "LaunchpadCLI\\": "inc/" @@ -3089,6 +3095,17 @@ "LaunchpadCLI\\Tests\\": "tests/" } }, + "scripts": { + "test-unit": [ + "\"vendor/bin/phpunit\" --testsuite unit --colors=always --configuration tests/Unit/phpunit.xml.dist" + ], + "test-integration": [ + "\"vendor/bin/phpunit\" --testsuite integration --colors=always --configuration tests/Integration/phpunit.xml.dist --exclude-group AdminOnly" + ], + "run-tests": [ + "@test-integration" + ] + }, "license": [ "proprietary" ], @@ -3107,16 +3124,16 @@ "packages-dev": [ { "name": "antecedent/patchwork", - "version": "2.2.0", + "version": "2.2.1", "source": { "type": "git", "url": "https://github.com/antecedent/patchwork.git", - "reference": "b07d4fb37c3c723c8755122160c089e077d5de65" + "reference": "1bf183a3e1bd094f231a2128b9ecc5363c269245" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/antecedent/patchwork/zipball/b07d4fb37c3c723c8755122160c089e077d5de65", - "reference": "b07d4fb37c3c723c8755122160c089e077d5de65", + "url": "https://api.github.com/repos/antecedent/patchwork/zipball/1bf183a3e1bd094f231a2128b9ecc5363c269245", + "reference": "1bf183a3e1bd094f231a2128b9ecc5363c269245", "shasum": "" }, "require": { @@ -3149,9 +3166,9 @@ ], "support": { "issues": "https://github.com/antecedent/patchwork/issues", - "source": "https://github.com/antecedent/patchwork/tree/2.2.0" + "source": "https://github.com/antecedent/patchwork/tree/2.2.1" }, - "time": "2024-09-27T16:59:55+00:00" + "time": "2024-12-11T10:19:54+00:00" }, { "name": "brain/monkey", @@ -3180,8 +3197,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-version/1": "1.x-dev", - "dev-master": "2.x-dev" + "dev-master": "2.x-dev", + "dev-version/1": "1.x-dev" } }, "autoload": { @@ -3481,16 +3498,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.12.0", + "version": "1.12.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c" + "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", - "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/123267b2c49fbf30d78a7b2d333f6be754b94845", + "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845", "shasum": "" }, "require": { @@ -3529,7 +3546,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.12.0" + "source": "https://github.com/myclabs/DeepCopy/tree/1.12.1" }, "funding": [ { @@ -3537,7 +3554,7 @@ "type": "tidelift" } ], - "time": "2024-06-12T14:39:25+00:00" + "time": "2024-11-08T17:47:46+00:00" }, { "name": "phar-io/manifest", @@ -3978,16 +3995,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.6.21", + "version": "9.6.22", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "de6abf3b6f8dd955fac3caad3af7a9504e8c2ffa" + "reference": "f80235cb4d3caa59ae09be3adf1ded27521d1a9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/de6abf3b6f8dd955fac3caad3af7a9504e8c2ffa", - "reference": "de6abf3b6f8dd955fac3caad3af7a9504e8c2ffa", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f80235cb4d3caa59ae09be3adf1ded27521d1a9c", + "reference": "f80235cb4d3caa59ae09be3adf1ded27521d1a9c", "shasum": "" }, "require": { @@ -3998,7 +4015,7 @@ "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.12.0", + "myclabs/deep-copy": "^1.12.1", "phar-io/manifest": "^2.0.4", "phar-io/version": "^3.2.1", "php": ">=7.3", @@ -4061,7 +4078,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.21" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.22" }, "funding": [ { @@ -4077,7 +4094,7 @@ "type": "tidelift" } ], - "time": "2024-09-19T10:50:18+00:00" + "time": "2024-12-05T13:48:26+00:00" }, { "name": "sebastian/cli-parser", @@ -5227,8 +5244,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-develop": "1.x-dev", - "dev-main": "1.x-dev" + "dev-main": "1.x-dev", + "dev-develop": "1.x-dev" } }, "autoload": { diff --git a/packages/uninstaller-take-off/composer.json b/packages/uninstaller-take-off/composer.json index 0979874..14710a4 100644 --- a/packages/uninstaller-take-off/composer.json +++ b/packages/uninstaller-take-off/composer.json @@ -1,44 +1,49 @@ { - "name": "wp-launchpad/uninstaller-take-off", - "description": "Uninstaller library for Launchpad framework", - "minimum-stability": "dev", - "license": "proprietary", - "type": "library", - "authors": [ - { - "name": "coquardcyr", - "email": "coquardcyr@gmail.com" + "name": "wp-launchpad/uninstaller-take-off", + "description": "Uninstaller library for Launchpad framework", + "license": "proprietary", + "type": "library", + "authors": [ + { + "name": "coquardcyr", + "email": "coquardcyr@gmail.com" + } + ], + "require": { + "wp-launchpad/cli": "^3.1", + "wp-launchpad/uninstaller": "^3.1", + "ext-mbstring": "*", + "ext-json": "*" + }, + "require-dev": { + "phpunit/phpunit": "^7.5 || ^8 || ^9", + "wp-media/phpunit": "^3.0" + }, + "autoload": { + "psr-4": { + "LaunchpadUninstallTakeOff\\": "inc/" + } + }, + "autoload-dev": { + "psr-4": { + "LaunchpadUninstallTakeOff\\Tests\\": "tests/" + } + }, + "extra": { + "launchpad": { + "provider": "LaunchpadUninstallTakeOff\\ServiceProvider", + "command": "uninstaller:initialize", + "install": true, + "clean": true, + "libraries": { + "wp-launchpad/uninstaller": "^0.0" + } + } + }, + "scripts": { + "test-integration": "\"vendor/bin/phpunit\" --testsuite integration --colors=always --configuration tests/Integration/phpunit.xml.dist", + "run-tests": [ + "@test-integration" + ] } - ], - "require": { - "wp-launchpad/cli": "^1.0", - "wp-launchpad/uninstaller": "^0.0", - "ext-mbstring": "*", - "ext-json": "*" - }, - "require-dev": { - "phpunit/phpunit": "^7.5 || ^8 || ^9", - "wp-media/phpunit": "^3.0" - }, - "autoload": { - "psr-4": { - "LaunchpadUninstallTakeOff\\": "inc/" - } - }, - "autoload-dev": { - "psr-4": { - "LaunchpadUninstallTakeOff\\Tests\\": "tests/" - } - }, - "extra": { - "launchpad": { - "provider" : "LaunchpadUninstallTakeOff\\ServiceProvider", - "command": "uninstaller:initialize", - "install": true, - "clean": true, - "libraries": { - "wp-launchpad/uninstaller": "^0.0" - } - } - } } diff --git a/packages/uninstaller/composer.json b/packages/uninstaller/composer.json index f0f36d4..fdcfeeb 100644 --- a/packages/uninstaller/composer.json +++ b/packages/uninstaller/composer.json @@ -1,36 +1,35 @@ { - "name": "wp-launchpad/uninstaller", - "minimum-stability": "dev", - "description": "Uninstaller from Launchpad framework", - "keywords": [ - "wordpress" - ], - "license": "GPL-2.0-or-later", - "authors": [ - { - "name": "CrochetFeve0251" + "name": "wp-launchpad/uninstaller", + "description": "Uninstaller from Launchpad framework", + "keywords": [ + "wordpress" + ], + "license": "GPL-2.0-or-later", + "authors": [ + { + "name": "CrochetFeve0251" + } + ], + "autoload": { + "psr-4": { + "LaunchpadUninstaller\\": "inc/" + } + }, + "autoload-dev": { + "psr-4": { + "LaunchpadUninstaller\\Tests\\": "tests/" + } + }, + "require": { + "wp-launchpad/core": "^3.1" + }, + "require-dev": { + "wp-media/phpunit": "^3.0" + }, + "scripts": { + "test-unit": "\"vendor/bin/phpunit\" --testsuite unit --colors=always --configuration tests/Unit/phpunit.xml.dist", + "run-tests": [ + "@test-unit" + ] } - ], - "autoload": { - "psr-4": { - "LaunchpadUninstaller\\": "inc/" - } - }, - "autoload-dev": { - "psr-4": { - "LaunchpadUninstaller\\Tests\\": "tests/" - } - }, - "require": { - "wp-launchpad/core": "^0.3 || @dev" - }, - "require-dev": { - "wp-media/phpunit": "^3.0" - }, - "scripts": { - "test-unit": "\"vendor/bin/phpunit\" --testsuite unit --colors=always --configuration tests/Unit/phpunit.xml.dist", - "run-tests": [ - "@test-unit" - ] - } } diff --git a/packages/updater-take-off/composer.json b/packages/updater-take-off/composer.json index 023792d..ce59dcd 100644 --- a/packages/updater-take-off/composer.json +++ b/packages/updater-take-off/composer.json @@ -1,26 +1,25 @@ { - "name": "wp-launchpad/updater-take-off", - "description": "Initialisation library for updater from Launchpad framework", - "minimum-stability": "dev", - "license": "proprietary", - "type": "library", - "authors": [ - { - "name": "coquardcyr", - "email": "coquardcyr@gmail.com" + "name": "wp-launchpad/updater-take-off", + "description": "Initialisation library for updater from Launchpad framework", + "license": "proprietary", + "type": "library", + "authors": [ + { + "name": "coquardcyr", + "email": "coquardcyr@gmail.com" + } + ], + "require-dev": { + "wp-launchpad/updater": "^3.1" + }, + "extra": { + "launchpad": { + "provider": "LaunchpadUpdater\\ServiceProvider", + "install": true, + "clean": true, + "libraries": { + "wp-launchpad/updater": "^0.3" + } + } } - ], - "require-dev": { - "wp-launchpad/updater": "^0.3" - }, - "extra": { - "launchpad": { - "provider" : "LaunchpadUpdater\\ServiceProvider", - "install": true, - "clean": true, - "libraries": { - "wp-launchpad/updater": "^0.3" - } - } - } } diff --git a/packages/updater/composer.json b/packages/updater/composer.json index ca2c09b..68ec925 100644 --- a/packages/updater/composer.json +++ b/packages/updater/composer.json @@ -1,38 +1,37 @@ { - "name": "wp-launchpad/updater", - "description": "Updater from Launchpad", - "minimum-stability": "dev", - "keywords": [ - "wordpress" - ], - "license": "GPL-2.0-or-later", - "authors": [ - { - "name": "CrochetFeve0251" + "name": "wp-launchpad/updater", + "description": "Updater from Launchpad", + "keywords": [ + "wordpress" + ], + "license": "GPL-2.0-or-later", + "authors": [ + { + "name": "CrochetFeve0251" + } + ], + "autoload": { + "psr-4": { + "LaunchpadUpdater\\": "inc/" + } + }, + "autoload-dev": { + "psr-4": { + "LaunchpadUpdater\\Tests\\": "tests/" + } + }, + "require": { + "wp-launchpad/core": "^3.1" + }, + "require-dev": { + "wp-media/phpunit": "^3.0", + "wp-launchpad/build": "^3.1" + }, + "scripts": { + "test-unit": "\"vendor/bin/phpunit\" --testsuite unit --colors=always --configuration tests/Unit/phpunit.xml.dist", + "test-integration-admin": "\"vendor/bin/phpunit\" --testsuite integration --colors=always --configuration tests/Integration/phpunit.xml.dist --group AdminOnly", + "run-tests": [ + "@test-integration-admin" + ] } - ], - "autoload": { - "psr-4": { - "LaunchpadUpdater\\": "inc/" - } - }, - "autoload-dev": { - "psr-4": { - "LaunchpadUpdater\\Tests\\": "tests/" - } - }, - "require": { - "wp-launchpad/core": "^0.3 || @dev" - }, - "require-dev": { - "wp-media/phpunit": "^3.0", - "wp-launchpad/build": "^0.0.9 || @dev" - }, - "scripts": { - "test-unit": "\"vendor/bin/phpunit\" --testsuite unit --colors=always --configuration tests/Unit/phpunit.xml.dist", - "test-integration-admin": "\"vendor/bin/phpunit\" --testsuite integration --colors=always --configuration tests/Integration/phpunit.xml.dist --group AdminOnly", - "run-tests": [ - "@test-integration-admin" - ] - } } diff --git a/packages/updater/tests/Integration/bootstrap.php b/packages/updater/tests/Integration/bootstrap.php index d09a01d..da196d4 100644 --- a/packages/updater/tests/Integration/bootstrap.php +++ b/packages/updater/tests/Integration/bootstrap.php @@ -16,8 +16,8 @@ function() { $prefix = 'test'; $container = new Container(); - - $plugin = new Plugin($container, new EventManager(), new SubscriberWrapper($prefix, $container), new Dispatcher()); + $dispatcher = new Dispatcher(); + $plugin = new Plugin($container, new EventManager(), new SubscriberWrapper($prefix, $container, $dispatcher), $dispatcher); $plugin->load([ 'prefix' => $prefix, 'version' => '3.16'