Skip to content

Commit 7f3bb7e

Browse files
authored
Merge pull request #16 from avto-dev/update-deps
Update deps
2 parents 439b2b9 + bdc8e0c commit 7f3bb7e

File tree

10 files changed

+52
-44
lines changed

10 files changed

+52
-44
lines changed

.github/workflows/tests.yml

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,37 +13,32 @@ on:
1313
jobs: # Docs: <https://git.io/JvxXE>
1414
php:
1515
name: PHP ${{ matrix.php }}, ${{ matrix.setup }} setup, laravel ${{ matrix.laravel }}
16-
runs-on: ubuntu-20.04
16+
runs-on: ubuntu-latest
1717
timeout-minutes: 10
1818
strategy:
1919
fail-fast: false
2020
matrix:
2121
setup: [basic, lowest]
2222
laravel: [default]
2323
coverage: [yes]
24-
php: ['7.3', '7.4', '8.0']
25-
include:
26-
- php: '7.3'
27-
setup: basic
28-
coverage: no
29-
laravel: '^7.0'
24+
php: ['8.0', '8.1', '8.2']
3025
steps:
3126
- name: Check out code
32-
uses: actions/checkout@v2
27+
uses: actions/checkout@v3
3328

3429
- name: Setup PHP, with composer and extensions
3530
uses: shivammathur/setup-php@v2 # Action page: <https://github.com/shivammathur/setup-php>
3631
with:
3732
php-version: ${{ matrix.php }}
3833
extensions: mbstring
39-
tools: composer:v1 # TODO update composer up to v2
34+
tools: composer:v2
4035

4136
- name: Get Composer Cache Directory # Docs: <https://git.io/JfAKn#php---composer>
4237
id: composer-cache
43-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
38+
run: echo "dir=dir::$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
4439

4540
- name: Cache dependencies # Docs: <https://git.io/JfAKn#php---composer>
46-
uses: actions/cache@v2
41+
uses: actions/cache@v3
4742
with:
4843
path: ${{ steps.composer-cache.outputs.dir }}
4944
key: ${{ runner.os }}-composer-${{ matrix.setup }}-${{ hashFiles('**/composer.json') }}
@@ -74,7 +69,7 @@ jobs: # Docs: <https://git.io/JvxXE>
7469
XDEBUG_MODE: coverage
7570
run: composer test-cover
7671

77-
- uses: codecov/codecov-action@v1 # Docs: <https://github.com/codecov/codecov-action>
72+
- uses: codecov/codecov-action@v3 # Docs: <https://github.com/codecov/codecov-action>
7873
if: matrix.coverage == 'yes'
7974
with:
8075
token: ${{ secrets.CODECOV_TOKEN }}
@@ -84,10 +79,10 @@ jobs: # Docs: <https://git.io/JvxXE>
8479

8580
lint-changelog:
8681
name: Lint changelog file
87-
runs-on: ubuntu-20.04
82+
runs-on: ubuntu-latest
8883
steps:
8984
- name: Check out code
90-
uses: actions/checkout@v2
85+
uses: actions/checkout@v3
9186

9287
- name: Lint changelog file
9388
uses: docker://avtodev/markdown-lint:v1 # Action page: <https://github.com/avto-dev/markdown-lint>

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog][keepachangelog] and this project adheres to [Semantic Versioning][semver].
66

7+
## Unreleased
8+
9+
### Changed
10+
11+
- Minimal require PHP version now is `8.0`
12+
- Minimal Laravel version now is `9.0`
13+
- Version of `composer` in docker container updated up to `2.5.3`
14+
715
## v3.4.0
816

917
### Added

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ FROM php:8.0-alpine
22

33
ENV COMPOSER_HOME="/tmp/composer"
44

5-
COPY --from=composer:2.0.7 /usr/bin/composer /usr/bin/composer
5+
COPY --from=composer:2.5.3 /usr/bin/composer /usr/bin/composer
66

77
RUN set -x \
88
&& apk add --no-cache binutils git \
9-
&& apk add --no-cache --virtual .build-deps autoconf pkgconf make g++ gcc 1>/dev/null \
9+
&& apk add --no-cache --virtual .build-deps linux-headers autoconf pkgconf make g++ gcc 1>/dev/null \
1010
# install xdebug (for testing with code coverage), but do not enable it
11-
&& pecl install xdebug-3.0.0 1>/dev/null \
11+
&& pecl install xdebug-3.2.0 1>/dev/null \
1212
&& apk del .build-deps \
1313
&& mkdir /src ${COMPOSER_HOME} \
1414
&& ln -s /usr/bin/composer /usr/bin/c \

composer.json

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,19 @@
1414
}
1515
],
1616
"require": {
17-
"php": "^7.3 || ^8.0",
18-
"symfony/console": "^4.4 || ^5.0 || ^6.0",
19-
"illuminate/contracts": "^6.0 || ^7.0 || ^8.0 || ^9.0",
20-
"illuminate/container": "^6.0 || ^7.0 || ^8.0 || ^9.0",
21-
"illuminate/support": "^6.0 || ^7.0 || ^8.0 || ^9.0",
22-
"illuminate/view": "^6.0 || ^7.0 || ^8.0 || ^9.0"
17+
"php": "^8.0",
18+
"symfony/console": "^6.0",
19+
"illuminate/contracts": "^9.0",
20+
"illuminate/container": "^9.0",
21+
"illuminate/support": "^9.0",
22+
"illuminate/view": "^9.0"
2323
},
2424
"require-dev": {
25-
"laravel/laravel": "^6.0 || ^7.0 || ^8.0 || ^9.0",
26-
"mockery/mockery": "^1.4",
27-
"phpstan/phpstan": "^0.12.34",
28-
"phpunit/phpunit": "^9.3"
25+
"laravel/laravel": "^9.0",
26+
"mockery/mockery": "^1.5.1",
27+
"phpstan/phpstan": "^1.9",
28+
"phpunit/phpunit": "^9.6",
29+
"nesbot/carbon": "^2.66.0"
2930
},
3031
"autoload": {
3132
"psr-4": {

config/version.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@
5656
*/
5757

5858
'config' => [
59-
'major' => (int) env('APP_VERSION_MAJOR', 1),
60-
'minor' => (int) env('APP_VERSION_MINOR', 0),
61-
'patch' => (int) env('APP_VERSION_PATCH', 0),
62-
'build' => (string) env('APP_VERSION_BUILD', 0),
59+
'major' => env('APP_VERSION_MAJOR', 1),
60+
'minor' => env('APP_VERSION_MINOR', 0),
61+
'patch' => env('APP_VERSION_PATCH', 0),
62+
'build' => env('APP_VERSION_BUILD', 0),
6363

6464
'build_file' => storage_path('app/APP_BUILD'),
6565
],

phpunit.xml.dist

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,13 @@
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
33
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
44
bootstrap="./tests/bootstrap.php"
5-
backupGlobals="false"
6-
backupStaticAttributes="false"
75
colors="true"
8-
convertErrorsToExceptions="true"
9-
convertNoticesToExceptions="true"
10-
convertWarningsToExceptions="true"
11-
processIsolation="false"
126
forceCoversAnnotation="true"
13-
stopOnFailure="false">
7+
>
148

159
<testsuites>
1610
<testsuite name="Unit">
17-
<directory suffix="Test.php">./tests</directory>
11+
<directory>./tests</directory>
1812
</testsuite>
1913
</testsuites>
2014

@@ -29,7 +23,7 @@
2923
<report>
3024
<clover outputFile="./coverage/clover.xml"/>
3125
<html outputDirectory="./coverage/html"/>
32-
<text outputFile="php://stdout" showUncoveredFiles="false"/>
26+
<text outputFile="php://stdout"/>
3327
<xml outputDirectory="./coverage/xml"/>
3428
</report>
3529
</coverage>

src/Drivers/ChangelogFileDriver.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ class ChangelogFileDriver implements DriverInterface
3030
*/
3131
public function __construct(ConfigRepository $config, Filesystem $filesystem)
3232
{
33-
$this->file_location = (string) $config->get(ServiceProvider::getConfigRootKeyName() . '.changelog.path');
33+
/** @var string|null $changelog_path */
34+
$changelog_path = $config->get(ServiceProvider::getConfigRootKeyName() . '.changelog.path');
35+
$this->file_location = (string) $changelog_path;
3436
$this->filesystem = $filesystem;
3537
}
3638

src/Drivers/ConfigFileDriver.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ class ConfigFileDriver implements DriverInterface
3535
*/
3636
public function __construct(ConfigRepository $config, Filesystem $filesystem)
3737
{
38-
$this->build_file_location = (string) $config->get(ServiceProvider::getConfigRootKeyName() . '.config.build_file');
38+
/** @var string|null $build_file */
39+
$build_file = $config->get(ServiceProvider::getConfigRootKeyName() . '.config.build_file');
40+
$this->build_file_location = (string) $build_file;
3941
$this->config = $config;
4042
$this->filesystem = $filesystem;
4143
}

src/Drivers/FileDriver.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ class FileDriver implements DriverInterface
3030
*/
3131
public function __construct(ConfigRepository $config, Filesystem $filesystem)
3232
{
33-
$this->file_location = (string) $config->get(ServiceProvider::getConfigRootKeyName() . '.file.path');
33+
/** @var string|null $file_path */
34+
$file_path = $config->get(ServiceProvider::getConfigRootKeyName() . '.file.path');
35+
$this->file_location = (string) $file_path;
3436
$this->filesystem = $filesystem;
3537
}
3638

src/ServiceProvider.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@ protected function registerManager(): void
6060
$this->app->singleton(ManagerInterface::class, static function (Container $app): ManagerInterface {
6161
/** @var ConfigRepository $config */
6262
$config = $app->make(ConfigRepository::class);
63-
$driver = $app->make($config->get(static::getConfigRootKeyName() . '.driver'));
63+
64+
/** @var string $driver_name */
65+
$driver_name = $config->get(static::getConfigRootKeyName() . '.driver');
66+
67+
$driver = $app->make($driver_name);
6468

6569
if ($driver instanceof DriverInterface) {
6670
return new AppVersionManager($driver->createRepository());

0 commit comments

Comments
 (0)