Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"config": {
"sort-packages": true,
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
"dealerdirect/phpcodesniffer-composer-installer": true,
"drupal/core-composer-scaffold": false
}
},
"require": {
Expand All @@ -37,7 +38,7 @@
"ext-simplexml": "*",
"chi-teck/drupal-coder-extension": "^2.0.0-rc2",
"drupal/coder": "8.3.24",
"drupal/core": "11.x-dev",
"drupal/core": "11.x-dev || 12.x-dev",
"phpspec/prophecy-phpunit": "^2.2",
"phpunit/phpunit": "^10.5",
"squizlabs/php_codesniffer": "^3.9",
Expand All @@ -49,6 +50,6 @@
"squizlabs/php_codesniffer": "<3.6",
"nikic/php-parser": "<4.17"
},
"minimum-stability": "RC",
"minimum-stability": "dev",
"prefer-stable": true
}
3 changes: 3 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
colors="true"
processIsolation="true">
<php>
<ini name="zend.exception_ignore_args" value="On"/>
</php>
<testsuites>
<testsuite name="unit">
<directory>./tests/unit</directory>
Expand Down
2 changes: 1 addition & 1 deletion src/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public static function create(ContainerInterface $container): self {
$application->dispatch(new GeneratorInfoAlter($all_generators))->generators,
);

$application->add(new Navigation());
$application->addCommand(new Navigation());
$application->setDefaultCommand('navigation');

/** @var \DrupalCodeGenerator\Application $application */
Expand Down
2 changes: 1 addition & 1 deletion src/Test/Functional/GeneratorTestBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ protected function execute(string $command_class, array $user_input): int {
->getInstanceFromDefinition($command_class);

\assert($command instanceof Command);
$application->add($command);
$application->addCommand($command);

$command_tester = new CommandTester($command);
/** @psalm-var int<0, 1> $result */
Expand Down
2 changes: 1 addition & 1 deletion src/Test/GeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ protected function tearDown(): void {
* stream.
*/
protected function execute(Command $command, array $user_input): int {
$this->createApplication()->add($command);
$this->createApplication()->addCommand($command);

$command_tester = new CommandTester($command);
$result = $command_tester
Expand Down
36 changes: 16 additions & 20 deletions tests/functional/Generator/Entity/EntityBundleClassTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,14 @@ public function testSingleBundleWithoutBaseClass(): void {

Entity type:
[ 1] Content block
[ 2] Comment
[ 3] Contact message
[ 4] File
[ 5] Custom menu link
[ 6] Content
[ 7] URL alias
[ 8] Shortcut link
[ 9] Taxonomy term
[10] User
[1] Content block
[2] Comment
[3] File
[4] Custom menu link
[5] Content
[6] URL alias
[7] Taxonomy term
[8] User

Bundles, comma separated:
Expand Down Expand Up @@ -104,16 +102,14 @@ public function testAllBundlesWithBaseClass(): void {

Entity type:
[ 1] Content block
[ 2] Comment
[ 3] Contact message
[ 4] File
[ 5] Custom menu link
[ 6] Content
[ 7] URL alias
[ 8] Shortcut link
[ 9] Taxonomy term
[10] User
[1] Content block
[2] Comment
[3] File
[4] Custom menu link
[5] Content
[6] URL alias
[7] Taxonomy term
[8] User

Bundles, comma separated:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Example
type: module
description: Example description.
package: Custom
core_version_requirement: ^10 || ^11
core_version_requirement: ^10 || ^11 || ^12
dependencies:
- views
- node
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/Generator/_module/bar/bar.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'Bar'
type: module
description: 'Some description.'
package: Custom
core_version_requirement: ^10 || ^11
core_version_requirement: ^10 || ^11 || ^12
dependencies:
- drupal:node
- drupal:system
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/Generator/_module/foo/foo.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ name: 'Foo'
type: module
description: 'Some description.'
package: Custom
core_version_requirement: ^10 || ^11
core_version_requirement: ^10 || ^11 || ^12
dependencies:
- drupal:views
2 changes: 1 addition & 1 deletion tests/functional/Generator/_theme/foo/foo.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ type: theme
base theme: bartik
description: Some description.
package: Custom
core_version_requirement: ^10 || ^11
core_version_requirement: ^10 || ^11 || ^12
libraries:
- foo/global
regions:
Expand Down
Loading