Skip to content
Merged
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
107 changes: 0 additions & 107 deletions .drone.jsonnet

This file was deleted.

135 changes: 0 additions & 135 deletions .drone.yml

This file was deleted.

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,24 @@ The Console package provides the infrastructure for building command line applic

## Installation via Composer

Add `"joomla/console": "~3.0"` to the require block in your composer.json and then run `composer install`.
Add `"joomla/console": "~4.0"` to the require block in your composer.json and then run `composer install`.

```json
{
"require": {
"joomla/console": "~3.0"
"joomla/console": "~4.0"
}
}
```

Alternatively, you can simply run the following from the command line:

```sh
composer require joomla/console "~3.0"
composer require joomla/console "~4.0"
```

If you want to include the test sources and docs, use

```sh
composer require --prefer-source joomla/console "~3.0"
composer require --prefer-source joomla/console "~4.0"
```
3 changes: 2 additions & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
These versions are currently being supported with security updates:

| Version | Supported |
| ------- | ------------------ |
|---------| ------------------ |
| 4.x.x | :white_check_mark: |
| 3.x.x | :white_check_mark: |
| 2.0.x | :white_check_mark: |

Expand Down
27 changes: 14 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@
"homepage": "https://github.com/joomla-framework/console",
"license": "GPL-2.0-or-later",
"require": {
"php": "^8.1.0",
"joomla/application": "^3.0",
"joomla/event": "^3.0",
"joomla/string": "^3.0",
"symfony/console": "^v6.2.0",
"symfony/error-handler": "^6"
"php": "^8.3.0",
"joomla/application": "dev-4.x-dev",
"joomla/event": "dev-4.x-dev",
"joomla/string": "dev-4.x-dev",
"symfony/console": "^v7.0.0",
"symfony/error-handler": "^7"
},
"require-dev": {
"joomla/test": "^3.0",
"phpunit/phpunit": "^9.5.28",
"psr/container": "^1.0",
"squizlabs/php_codesniffer": "~3.7.2",
"phpstan/phpstan": "1.12.27",
"phpstan/phpstan-deprecation-rules": "1.2.1"
"joomla/test": "dev-4.x-dev",
"phpunit/phpunit": "^12.0",
"psr/container": "^2.0",
"squizlabs/php_codesniffer": "~3.10.2",
"phpstan/phpstan": "2.1.17",
"phpstan/phpstan-deprecation-rules": "2.0.3"
},
"suggest": {
"psr/container-implementation": "To use the ContainerLoader"
Expand All @@ -38,7 +38,8 @@
"extra": {
"branch-alias": {
"dev-2.0-dev": "2.0-dev",
"dev-3.x-dev": "3.0-dev"
"dev-3.x-dev": "3.0-dev",
"dev-4.x-dev": "4.0-dev"
}
}
}
2 changes: 1 addition & 1 deletion src/Helper/DescriptorHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function describe(OutputInterface $output, $object, array $options = [])
*
* @since 2.0.0
*/
public function getName()
public function getName(): string
{
return 'descriptor';
}
Expand Down
18 changes: 11 additions & 7 deletions tests/ApplicationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
use Joomla\Event\Dispatcher;
use Joomla\Test\TestHelper;
use PHPUnit\Framework\TestCase;
use PHPUnit\Framework\Attributes\DataProvider;
use Psr\Container\ContainerInterface;
use Psr\Container\NotFoundExceptionInterface;
use Symfony\Component\Console\Exception\CommandNotFoundException;
Expand Down Expand Up @@ -151,15 +152,17 @@ public function testSetGetVersion()
/**
* Data provider for testGetLongVersion
*
* @return \Generator
* @return array
*/
public function dataGetLongVersion(): \Generator
public static function dataGetLongVersionProvider(): array
{
// Args: App Name, App Version, Expected Return
yield 'Empty name and version' => ['', '', 'Joomla Console Application'];
yield 'Name without version' => ['Console Application', '', 'Console Application'];
yield 'Version without name' => ['', '1.0.0', 'Joomla Console Application <info>1.0.0</info>'];
yield 'Version with name' => ['Console Application', '1.0.0', 'Console Application <info>1.0.0</info>'];
return [
'Empty name and version' => ['', '', 'Joomla Console Application'],
'Name without version' => ['Console Application', '', 'Console Application'],
'Version without name' => ['', '1.0.0', 'Joomla Console Application <info>1.0.0</info>'],
'Version with name' => ['Console Application', '1.0.0', 'Console Application <info>1.0.0</info>'],
];
}

/**
Expand All @@ -171,6 +174,7 @@ public function dataGetLongVersion(): \Generator
*
* @dataProvider dataGetLongVersion
*/
#[DataProvider('dataGetLongVersionProvider')]
public function testGetLongVersion(string $name, string $version, string $expected)
{
$this->object->setName($name);
Expand Down Expand Up @@ -696,7 +700,7 @@ public function get($id)
return $this->services[$id]($this);
}

public function has($id)
public function has(string $id): bool
{
return isset($this->services[$id]);
}
Expand Down