Skip to content

Commit

Permalink
Allow consolidation/log ^3 (#1108)
Browse files Browse the repository at this point in the history
* Allow consolidation/log ^3

* Try roave/backward-compatibility-check ^6

* Update grasmash/expander

* Use LoggerAwareTrait from psr/log

* We also need to remove the field definition

* Remove references to ConsoleLogLevel

* Remove support for older Symfony, PHP

* Update composer.lock

* Use standard semver version constraint notation in table in README

* Drop older versions of PHP from test matrix

* Run cs tests with php 8

* Test with Symfony Console 5.1.11

* We no longer test on Travis

* Protect VERSION from direct access so that our b/c checks are not broken by version changes

* Typo

* Semver || confuses markdown tables

* Fix inconsistency in README table

* Also test 4.x branch

* Also drop support for Symfony 5

* Release 4.0.0-alpha1

* Release 4.0.0-alpha2

* Update b/c tool version

* Back to dev

* Revert "Remove references to ConsoleLogLevel"

This reverts commit ea2b859.

* Move ConsoleLogLevel::SUCCESS to RoboLogLevel

* Document that we no longer support Symfony 5 in latest version
  • Loading branch information
greg-1-anderson authored Apr 27, 2022
1 parent ccf8096 commit d380673
Show file tree
Hide file tree
Showing 14 changed files with 288 additions and 549 deletions.
24 changes: 8 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ on:
pull_request:
branches:
- 3.x
- 4.x
push:
branches:
- 3.x
- 4.x

name: CI

Expand All @@ -24,7 +26,7 @@ jobs:
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
php-version: 8.0
coverage: none

- name: Install dependencies
Expand Down Expand Up @@ -53,17 +55,17 @@ jobs:
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
php-version: 8.0
coverage: none
extensions: intl

- name: Install roave/backward-compatibility-check
run: |
mkdir -p tools
composer --working-dir=tools require roave/backward-compatibility-check:^5
composer --working-dir=tools require roave/backward-compatibility-check:^7
- name: Run roave/backward-compatibility-check
run: ./tools/vendor/bin/roave-backward-compatibility-check --from=3.0.8
run: ./tools/vendor/bin/roave-backward-compatibility-check --from=4.0.0-alpha1

tests:
name: Tests
Expand All @@ -80,7 +82,7 @@ jobs:
- windows-latest

php-version:
- "7.4"
- "8.0"

php-ini-values:
- assert.exception=1, zend.assertions=1, phar.readonly=false
Expand All @@ -89,19 +91,9 @@ jobs:
- locked

include:
- os: ubuntu-latest
php-version: "7.1"
dependencies: lowest
php-ini-values: assert.exception=1, zend.assertions=1, phar.readonly=false

- os: ubuntu-latest
php-version: "7.4"
dependencies: highest
php-ini-values: assert.exception=1, zend.assertions=1, phar.readonly=false

- os: ubuntu-latest
php-version: "8.0"
dependencies: highest
dependencies: lowest
php-ini-values: assert.exception=1, zend.assertions=1, opcache.enable=1, opcache.enable_cli=1, opcache.optimization_level=-1, opcache.jit_buffer_size=4096M, opcache.jit=1205, phar.readonly=false

- os: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ vendor/
.idea/
build
site/
tools/
robotheme/
tests/_log/*
tests/_helpers/_generated/*
Expand Down
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@

## Branches

| Branch | Support Level | Symfony Versions | League Container | PHP Versions |
| ------ | ------------- | ---------------- | ---------------- | ------------ |
| [3.x](https://github.com/consolidation/robo/tree/3.x) | Stable | 4 & 5 | ^3 | 7.1 - 8.0 |
| [2.x](https://github.com/consolidation/robo/tree/2.x) | Not recommended | 4 & 5 | ^2 | 7.1 - 7.4 |
| [1.x](https://github.com/consolidation/robo/tree/1.x) | Not recommended | 2 - 4 | ^2 | 5.5 - 7.4 |

The pre-build [robo.phar](https://robo.li/robo.phar) is built with Symfony 5, and requires PHP 7.2+. Robo also works with Symfony 4 and PHP 7.1.3+ if packaged as a library in another application. For Symfony 2 or 3 support, or PHP versions prior to 7.1, please use the Robo 1.x branch.
| Branch | Support Level | Symfony | League Container | psr/log | PHP Versions |
| ------ | ------------- | ------- | ---------------- | ------------ | ------------ |
| [4.x](https://github.com/consolidation/robo/tree/4.x) | Stable | 6 | 3 | 2 - 3 | 8.0 - 8.1 |
| [3.x](https://github.com/consolidation/robo/tree/3.x) | Important fixes only | 4 - 6 | 3 | 1 - 2 | 7.1 - 8.1 |
| [2.x](https://github.com/consolidation/robo/tree/2.x) | Not recommended | 4 - 5 | 2 | 1 - 2 | 7.1 - 7.4 |
| [1.x](https://github.com/consolidation/robo/tree/1.x) | Not recommended | 2 - 4 | 2 | 1 - 2 | 5.5 - 7.4 |

All three branches of Robo are currently supported, although the 2.x and 1.x branches receive minimum support. All versions are roughly compatible; the breaking changes introduced at each major version are fairly minor, and typically only affect classes that are not used by most clients.

Expand Down Expand Up @@ -56,7 +55,7 @@ Now you can use it simply via `robo`.

### Composer

* Run `composer require consolidation/robo:^3`
* Run `composer require consolidation/robo:^4`
* Use `vendor/bin/robo` to execute Robo tasks.

## Usage
Expand Down
8 changes: 4 additions & 4 deletions RoboFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function release(ConsoleIO $io, $opts = ['beta' => false])
{
$this->checkPharReadonly();

$version = \Robo\Robo::VERSION;
$version = \Robo\Robo::version();
$stable = !$opts['beta'];
if ($stable) {
$version = preg_replace('/-.*/', '', $version);
Expand Down Expand Up @@ -143,7 +143,7 @@ public function release(ConsoleIO $io, $opts = ['beta' => false])
*/
public function changed(ConsoleIO $io, $addition)
{
$version = preg_replace('/-.*/', '', \Robo\Robo::VERSION);
$version = preg_replace('/-.*/', '', \Robo\Robo::version());
return $this->collectionBuilder($io)->taskChangelog()
->version($version)
->change($addition)
Expand All @@ -161,7 +161,7 @@ public function versionBump($version = '', $options = ['stage' => ''])
{
// If the user did not specify a version, then update the current version.
if (empty($version)) {
$version = $this->incrementVersion(\Robo\Robo::VERSION, $options['stage']);
$version = $this->incrementVersion(\Robo\Robo::version(), $options['stage']);
}
return $this->writeVersion($version);
}
Expand Down Expand Up @@ -484,7 +484,7 @@ public function pharPublish(ConsoleIO $io)
->rename('robo-release.phar', 'robotheme/robo.phar')
->taskGitStack()
->add('robotheme/robo.phar')
->commit('Update robo.phar to ' . \Robo\Robo::VERSION)
->commit('Update robo.phar to ' . \Robo\Robo::version())
->push('origin site')
->checkout(self::MAIN_BRANCH)
->run();
Expand Down
47 changes: 10 additions & 37 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@
"robo"
],
"require": {
"php": ">=7.1.3",
"php": ">=8.0",
"consolidation/annotated-command": "^4.3",
"consolidation/config": "^1.2.1 || ^2.0.1",
"consolidation/log": "^1.1.1 || ^2.0.2",
"consolidation/config": "^2.0.1",
"consolidation/log": "^2.0.2 || ^3",
"consolidation/output-formatters": "^4.1.2",
"consolidation/self-update": "^2.0",
"league/container": "^3.3.1 || ^4.0",
"symfony/console": "^4.4.19 || ^5 || ^6",
"symfony/event-dispatcher": "^4.4.19 || ^5 || ^6",
"symfony/filesystem": "^4.4.9 || ^5 || ^6",
"symfony/finder": "^4.4.9 || ^5 || ^6",
"symfony/process": "^4.4.9 || ^5 || ^6",
"symfony/yaml": "^4.4 || ^5 || ^6"
"symfony/console": "^6",
"symfony/event-dispatcher": "^6",
"symfony/filesystem": "^6",
"symfony/finder": "^6",
"symfony/process": "^6",
"symfony/yaml": "^6"
},
"require-dev": {
"natxet/cssmin": "3.0.4",
Expand All @@ -59,34 +59,7 @@
"optimize-autoloader": true,
"sort-packages": true,
"platform": {
"php": "7.2.28"
}
},
"extra": {
"scenarios": {
"symfony4": {
"require": {
"symfony/console": "^4.4.11",
"symfony/event-dispatcher": "^4.4.11",
"symfony/filesystem": "^4.4.11",
"symfony/finder": "^4.4.11",
"symfony/process": "^4.4.11",
"phpunit/phpunit": "^6",
"nikic/php-parser": "^2"
},
"remove": [
"codeception/phpunit-wrapper"
],
"config": {
"platform": {
"php": "7.1.3"
}
}
}
},
"branch-alias": {
"dev-master": "2.x-dev",
"dev-main": "2.x-dev"
"php": "8.0.17"
}
},
"suggest": {
Expand Down
Loading

0 comments on commit d380673

Please sign in to comment.