Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix php ini parsing from the CLI #62

Closed
wants to merge 49 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
ad4f150
Bump
sebastianbergmann Jul 3, 2021
0b96965
Update PHPUnit configuration
sebastianbergmann Jul 3, 2021
a88ed31
Remove roave-backward-compatibility-check as it cannot process code t…
sebastianbergmann Jul 3, 2021
eccb966
Update tools
sebastianbergmann Jul 22, 2021
21117ec
Update tools
sebastianbergmann Jul 24, 2021
ff9719d
Update tools
sebastianbergmann Jul 31, 2021
e3cfb5a
Update tools
sebastianbergmann Aug 4, 2021
cfa0c1a
Update tools
sebastianbergmann Aug 13, 2021
26c98f5
Update tools
sebastianbergmann Aug 16, 2021
b61d65a
Use >= operator instead of ^ operator for PHP version constraint
sebastianbergmann Nov 30, 2020
0f58cf9
Update URLs
sebastianbergmann Aug 17, 2021
8936f79
Update test
sebastianbergmann Aug 17, 2021
c89e2b9
Update tools
sebastianbergmann Aug 20, 2021
12b5e92
Update tools
sebastianbergmann Aug 30, 2021
9417306
Update tools
sebastianbergmann Sep 8, 2021
997a1e2
Update tools
sebastianbergmann Sep 16, 2021
d184ba8
Update tools
sebastianbergmann Oct 5, 2021
13928c1
Update PHPUnit configuration
sebastianbergmann Oct 5, 2021
d053feb
Update tools
sebastianbergmann Oct 28, 2021
f3c2fbe
Update tools
sebastianbergmann Nov 6, 2021
46c7d52
Update tools
sebastianbergmann Nov 11, 2021
ea573df
Update tools
sebastianbergmann Nov 29, 2021
681d0b7
Update tools
sebastianbergmann Dec 13, 2021
d3acc09
Update tools
sebastianbergmann Dec 22, 2021
1381bff
Update tools
sebastianbergmann Dec 26, 2021
1d5205b
Update tools
sebastianbergmann Dec 26, 2021
a713beb
Update tools
sebastianbergmann Jan 1, 2022
eb272f1
Bump copyright year
sebastianbergmann Jan 1, 2022
c8a6410
Update tools
sebastianbergmann Jan 9, 2022
675feae
Update tools
sebastianbergmann Jan 14, 2022
deebc60
Update tools
sebastianbergmann Jan 22, 2022
1ab3fbe
Update tools
sebastianbergmann Feb 7, 2022
2b58e44
Update tools
sebastianbergmann Feb 8, 2022
ba8c373
Cleanup
sebastianbergmann Feb 11, 2022
1f39cf2
Leftover
sebastianbergmann Feb 11, 2022
869a548
Remove deprecated totallyTyped attribute
sebastianbergmann Feb 23, 2022
32c2b00
Update tools
sebastianbergmann Feb 23, 2022
c6364ec
Update tools
sebastianbergmann Mar 6, 2022
ab86f3b
Update tools
sebastianbergmann Mar 8, 2022
d617fbd
Update tools
sebastianbergmann Mar 21, 2022
87c4452
Cleanup
sebastianbergmann Mar 29, 2022
e529193
Test with PHP 8.2
sebastianbergmann Mar 29, 2022
8e909ec
Bump
sebastianbergmann Mar 29, 2022
c938ab7
Update tools
sebastianbergmann Mar 30, 2022
081b50b
Drop support for PHP 8.0
sebastianbergmann Mar 30, 2022
0daf717
Update tools
sebastianbergmann Mar 31, 2022
7b321b3
Add modification to the getCurrentSettings
dingo-d Apr 2, 2022
0da1ced
Add tests
dingo-d Apr 2, 2022
8cb8998
Fix indentation
dingo-d Apr 2, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
66 changes: 26 additions & 40 deletions .github/workflows/ci.yml
Expand Up @@ -8,73 +8,59 @@ name: "CI"

jobs:
coding-guidelines:
name: "Coding Guidelines"
name: Coding Guidelines

runs-on: "ubuntu-latest"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"

- name: "Run friendsofphp/php-cs-fixer"
run: "php7.4 ./tools/php-cs-fixer fix --dry-run --show-progress=dots --using-cache=no --verbose"

type-checker:
name: "Type Checker"

runs-on: "ubuntu-latest"
runs-on: ubuntu-latest

steps:
- name: "Checkout"
uses: "actions/checkout@v2"
- name: Checkout
uses: actions/checkout@v3

- name: "Update dependencies with composer"
run: "php7.4 ./tools/composer update --no-ansi --no-interaction --no-progress"
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
coverage: none

- name: "Run vimeo/psalm"
run: "php7.4 ./tools/psalm --config=.psalm/config.xml --no-progress --shepherd --show-info=false --stats"
- name: Run friendsofphp/php-cs-fixer
run: ./tools/php-cs-fixer fix --dry-run --show-progress=dots --using-cache=no --verbose

backward-compatibility:
name: Backward Compatibility
type-checker:
name: Type Checker

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Fetch tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
uses: actions/checkout@v3

- name: Install PHP with extensions
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
php-version: 8.1
coverage: none
extensions: intl

- name: Run roave/backward-compatibility-check
run: ./tools/roave-backward-compatibility-check --from=5.0.0
- name: Update dependencies with composer
run: ./tools/composer update --no-interaction --no-ansi --no-progress

- name: Run vimeo/psalm
run: ./tools/psalm --config=.psalm/config.xml --no-progress --shepherd --show-info=false --stats

tests:
name: "Tests"
name: Tests

runs-on: "ubuntu-latest"
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php-version:
- "7.3"
- "7.4"
- "8.0"
- "8.1"
- "8.2"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"
uses: "actions/checkout@v3"

- name: "Install PHP with extensions"
uses: "shivammathur/setup-php@v2"
Expand All @@ -83,7 +69,7 @@ jobs:
coverage: "pcov"

- name: "Cache dependencies installed with composer"
uses: "actions/cache@v1"
uses: "actions/cache@v2"
with:
path: "~/.composer/cache"
key: "php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.json') }}"
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
@@ -1,7 +1,7 @@
/.idea
/.php-cs-fixer.php
/.php-cs-fixer.cache
/.phpunit.result.cache
/.phpunit.cache
/.psalm/cache
/composer.lock
/vendor
7 changes: 3 additions & 4 deletions .phive/phars.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="php-cs-fixer" version="^3.0" installed="3.0.0" location="./tools/php-cs-fixer" copy="true"/>
<phar name="psalm" version="^4.0" installed="4.8.1" location="./tools/psalm" copy="true"/>
<phar name="roave/backwardcompatibilitycheck" version="^5.0.0" installed="5.0.0" location="./tools/roave-backward-compatibility-check" copy="true"/>
<phar name="composer" version="^2.0.3" installed="2.1.3" location="./tools/composer" copy="true"/>
<phar name="php-cs-fixer" version="^3.0" installed="3.8.0" location="./tools/php-cs-fixer" copy="true"/>
<phar name="psalm" version="^4.0" installed="4.22.0" location="./tools/psalm" copy="true"/>
<phar name="composer" version="^2.0.3" installed="2.3.2" location="./tools/composer" copy="true"/>
</phive>
16 changes: 1 addition & 15 deletions .psalm/baseline.xml
@@ -1,23 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="4.0.1@b1e2e30026936ef8d5bf6a354d1c3959b6231f44">
<files psalm-version="4.x-dev@">
<file src="src/Console.php">
<ForbiddenCode occurrences="2">
<code>shell_exec('stty size')</code>
<code>shell_exec('stty')</code>
</ForbiddenCode>
</file>
<file src="src/Runtime.php">
<DocblockTypeContradiction occurrences="4">
<code>self::$binary === null</code>
<code>self::$binary === null</code>
<code>self::$binary === null</code>
<code>self::$binary === null</code>
</DocblockTypeContradiction>
<InvalidReturnType occurrences="1">
<code>string</code>
</InvalidReturnType>
<UndefinedConstant occurrences="1">
<code>HHVM_VERSION</code>
</UndefinedConstant>
</file>
</files>
1 change: 0 additions & 1 deletion .psalm/config.xml
Expand Up @@ -5,7 +5,6 @@
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
resolveFromConfigFile="false"
cacheDirectory=".psalm/cache"
totallyTyped="false"
errorBaseline=".psalm/baseline.xml"
>
<projectFiles>
Expand Down
52 changes: 24 additions & 28 deletions ChangeLog.md
Expand Up @@ -2,6 +2,14 @@

All notable changes in `sebastianbergmann/environment` are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.

## [6.0.0] - 2022-MM-DD

### Removed

* Removed `SebastianBergmann\Environment\OperatingSystem::getFamily()` because this component is no longer supported on PHP versions that do not have `PHP_OS_FAMILY`
* Removed `SebastianBergmann\Environment\Runtime::isHHVM()`
* This component is no longer supported on PHP 7.3, PHP 7.4, and PHP 8.0

## [5.1.3] - 2020-09-28

### Changed
Expand Down Expand Up @@ -36,13 +44,7 @@ All notable changes in `sebastianbergmann/environment` are documented in this fi

### Changed

* `Runtime::getNameWithVersionAndCodeCoverageDriver()` now prioritizes PCOV over Xdebug when both extensions are loaded (just like php-code-coverage does)

## [5.0.0] - 2020-02-07

### Removed

* This component is no longer supported on PHP 7.1 and PHP 7.2
* Changed PHP version constraint in `composer.json` from `^7.1` to `>=7.1`

## [4.2.3] - 2019-11-20

Expand Down Expand Up @@ -145,25 +147,19 @@ All notable changes in `sebastianbergmann/environment` are documented in this fi

* This component is no longer supported on PHP 5.6

[5.1.3]: https://github.com/sebastianbergmann/environment/compare/5.1.2...5.1.3
[5.1.2]: https://github.com/sebastianbergmann/environment/compare/5.1.1...5.1.2
[5.1.1]: https://github.com/sebastianbergmann/environment/compare/5.1.0...5.1.1
[5.1.0]: https://github.com/sebastianbergmann/environment/compare/5.0.2...5.1.0
[5.0.2]: https://github.com/sebastianbergmann/environment/compare/5.0.1...5.0.2
[5.0.1]: https://github.com/sebastianbergmann/environment/compare/5.0.0...5.0.1
[5.0.0]: https://github.com/sebastianbergmann/environment/compare/4.2.3...5.0.0
[4.2.3]: https://github.com/sebastianbergmann/environment/compare/4.2.2...4.2.3
[4.2.2]: https://github.com/sebastianbergmann/environment/compare/4.2.1...4.2.2
[4.2.1]: https://github.com/sebastianbergmann/environment/compare/4.2.0...4.2.1
[4.2.0]: https://github.com/sebastianbergmann/environment/compare/4.1.0...4.2.0
[4.1.0]: https://github.com/sebastianbergmann/environment/compare/4.0.2...4.1.0
[4.0.2]: https://github.com/sebastianbergmann/environment/compare/4.0.1...4.0.2
[4.0.1]: https://github.com/sebastianbergmann/environment/compare/66691f8e2dc4641909166b275a9a4f45c0e89092...4.0.1
[4.0.0]: https://github.com/sebastianbergmann/environment/compare/3.1.0...66691f8e2dc4641909166b275a9a4f45c0e89092
[3.1.0]: https://github.com/sebastianbergmann/environment/compare/3.0...3.1.0
[3.0.4]: https://github.com/sebastianbergmann/environment/compare/3.0.3...3.0.4
[3.0.3]: https://github.com/sebastianbergmann/environment/compare/3.0.2...3.0.3
[3.0.2]: https://github.com/sebastianbergmann/environment/compare/3.0.1...3.0.2
[3.0.1]: https://github.com/sebastianbergmann/environment/compare/3.0.0...3.0.1
[3.0.0]: https://github.com/sebastianbergmann/environment/compare/2.0...3.0.0
[4.2.4]: https://github.com/sebastianbergmann/phpunit/compare/4.2.3...4.2.4
[4.2.3]: https://github.com/sebastianbergmann/phpunit/compare/4.2.2...4.2.3
[4.2.2]: https://github.com/sebastianbergmann/phpunit/compare/4.2.1...4.2.2
[4.2.1]: https://github.com/sebastianbergmann/phpunit/compare/4.2.0...4.2.1
[4.2.0]: https://github.com/sebastianbergmann/phpunit/compare/4.1.0...4.2.0
[4.1.0]: https://github.com/sebastianbergmann/phpunit/compare/4.0.2...4.1.0
[4.0.2]: https://github.com/sebastianbergmann/phpunit/compare/4.0.1...4.0.2
[4.0.1]: https://github.com/sebastianbergmann/phpunit/compare/66691f8e2dc4641909166b275a9a4f45c0e89092...4.0.1
[4.0.0]: https://github.com/sebastianbergmann/phpunit/compare/3.1.0...66691f8e2dc4641909166b275a9a4f45c0e89092
[3.1.0]: https://github.com/sebastianbergmann/phpunit/compare/3.0...3.1.0
[3.0.4]: https://github.com/sebastianbergmann/phpunit/compare/3.0.3...3.0.4
[3.0.3]: https://github.com/sebastianbergmann/phpunit/compare/3.0.2...3.0.3
[3.0.2]: https://github.com/sebastianbergmann/phpunit/compare/3.0.1...3.0.2
[3.0.1]: https://github.com/sebastianbergmann/phpunit/compare/3.0.0...3.0.1
[3.0.0]: https://github.com/sebastianbergmann/phpunit/compare/2.0...3.0.0

2 changes: 1 addition & 1 deletion LICENSE
@@ -1,6 +1,6 @@
sebastian/environment

Copyright (c) 2014-2021, Sebastian Bergmann <sebastian@phpunit.de>.
Copyright (c) 2014-2022, Sebastian Bergmann <sebastian@phpunit.de>.
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
9 changes: 5 additions & 4 deletions composer.json
Expand Up @@ -12,17 +12,18 @@
],
"config": {
"platform": {
"php": "7.3.0"
"php": "8.1.0"
},
"optimize-autoloader": true,
"sort-packages": true
},
"prefer-stable": true,
"minimum-stability": "dev",
"require": {
"php": ">=7.3"
"php": ">=8.1"
},
"require-dev": {
"phpunit/phpunit": "^9.3"
"phpunit/phpunit": "^10.0"
},
"suggest": {
"ext-posix": "*"
Expand All @@ -34,7 +35,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "5.1-dev"
"dev-master": "6.0-dev"
}
}
}
14 changes: 8 additions & 6 deletions phpunit.xml
@@ -1,21 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd"
bootstrap="vendor/autoload.php"
cacheDirectory=".phpunit.cache"
executionOrder="depends,defects"
forceCoversAnnotation="true"
beStrictAboutCoversAnnotation="true"
requireCoverageMetadata="true"
beStrictAboutCoverageMetadata="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTodoAnnotatedTests="true"
failOnRisky="true"
failOnWarning="true"
colors="true"
verbose="true">
<testsuites>
<testsuite name="default">
<directory suffix="Test.php">tests</directory>
<directory>tests</directory>
</testsuite>
</testsuites>

<coverage processUncoveredFiles="true">
<coverage>
<include>
<directory suffix=".php">src</directory>
</include>
Expand Down
53 changes: 0 additions & 53 deletions src/OperatingSystem.php

This file was deleted.