Skip to content
This repository was archived by the owner on Sep 10, 2020. It is now read-only.

Commit 5793067

Browse files
authored
Laravel updated up to 7 and regular repository update made (#33)
1 parent 943682d commit 5793067

11 files changed

Lines changed: 150 additions & 186 deletions

File tree

.editorconfig

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ indent_style = space
88
indent_size = 4
99
trim_trailing_whitespace = true
1010

11-
[*.{md,json}]
12-
trim_trailing_whitespace = false
13-
14-
[*.{yml,yaml,sh,conf,neon*}]
11+
[*.{yml, yaml, sh, conf, neon*}]
1512
indent_size = 2
1613

1714
[Makefile]

.github/CODEOWNERS

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/workflows/execute-tests.yml

Lines changed: 0 additions & 94 deletions
This file was deleted.

.github/workflows/tests.yml

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags-ignore:
8+
- '**'
9+
pull_request:
10+
schedule:
11+
- cron: '0 0 * * 0' # once in a week, docs: <https://git.io/JvxXE#onschedule>
12+
13+
jobs: # Docs: <https://git.io/JvxXE>
14+
php:
15+
name: PHP ${{ matrix.php }}, ${{ matrix.setup }} setup, laravel ${{ matrix.laravel }}
16+
runs-on: ubuntu-latest
17+
timeout-minutes: 10
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
setup: [basic, lowest]
22+
laravel: [default]
23+
coverage: [yes]
24+
php: ['7.2', '7.3', '7.4']
25+
include:
26+
- php: '7.3'
27+
setup: basic
28+
coverage: no
29+
phpunit: '^7.5'
30+
laravel: '~5.7.0'
31+
- php: '7.3'
32+
setup: basic
33+
coverage: no
34+
laravel: '~5.8.0'
35+
- php: '7.3'
36+
setup: basic
37+
coverage: no
38+
laravel: '^6.0'
39+
steps:
40+
- name: Check out code
41+
uses: actions/checkout@v2
42+
43+
- name: Setup PHP, with composer and extensions
44+
uses: shivammathur/setup-php@v2 # Action page: <https://github.com/shivammathur/setup-php>
45+
with:
46+
php-version: ${{ matrix.php }}
47+
extensions: mbstring
48+
49+
- name: Get Composer Cache Directory # Docs: <https://git.io/JfAKn#php---composer>
50+
id: composer-cache
51+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
52+
53+
- name: Cache dependencies # Docs: <https://git.io/JfAKn#php---composer>
54+
uses: actions/cache@v2
55+
with:
56+
path: ${{ steps.composer-cache.outputs.dir }}
57+
key: ${{ runner.os }}-composer-${{ matrix.setup }}-${{ hashFiles('**/composer.json') }}
58+
restore-keys: ${{ runner.os }}-composer-
59+
60+
- name: Install Composer 'hirak/prestissimo' package
61+
run: composer global require hirak/prestissimo --update-no-dev --no-progress --ansi
62+
63+
- name: Install lowest Composer dependencies
64+
if: matrix.setup == 'lowest'
65+
run: composer update --prefer-dist --no-suggest --prefer-lowest --ansi
66+
67+
- name: Install basic Composer dependencies
68+
if: matrix.setup == 'basic'
69+
run: composer update --prefer-dist --no-suggest --ansi
70+
71+
- name: Install specific laravel version
72+
if: matrix.laravel != 'default'
73+
run: composer require --dev --update-with-dependencies --prefer-dist --no-suggest --ansi laravel/laravel "${{ matrix.laravel }}"
74+
75+
- name: Install specific phpunit version
76+
if: matrix.phpunit != ''
77+
run: composer require --dev --update-with-dependencies --prefer-dist --no-suggest --ansi phpunit/phpunit "${{ matrix.phpunit }}"
78+
79+
- name: Show most important packages versions
80+
run: composer info | grep -e laravel -e phpunit -e phpstan
81+
82+
- name: Execute tests
83+
if: matrix.coverage != 'yes'
84+
run: composer test
85+
86+
- name: Execute tests with code coverage
87+
if: matrix.coverage == 'yes'
88+
run: composer test-cover
89+
90+
- uses: codecov/codecov-action@v1 # Docs: <https://github.com/codecov/codecov-action>
91+
if: matrix.coverage == 'yes'
92+
with:
93+
token: ${{ secrets.CODECOV_TOKEN }}
94+
file: ./coverage/clover.xml
95+
flags: php
96+
fail_ci_if_error: false
97+
98+
lint-changelog:
99+
name: Lint changelog file
100+
runs-on: ubuntu-latest
101+
steps:
102+
- name: Check out code
103+
uses: actions/checkout@v2
104+
105+
- name: Lint changelog file
106+
uses: docker://avtodev/markdown-lint:v1 # Action page: <https://github.com/avto-dev/markdown-lint>
107+
with:
108+
rules: '/lint/rules/changelog.js'
109+
config: '/lint/config/changelog.yml'
110+
args: './CHANGELOG.md'

.travis.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,22 @@ 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+
## v2.3.0
8+
9+
### Changed
10+
11+
- Maximal `illuminate/*` packages version now is `7.*`
12+
- CI completely moved from "Travis CI" to "Github Actions" _(travis builds disabled)_
13+
- Minimal required PHP version now is `7.2`
14+
15+
### Added
16+
17+
- PHP 7.4 is supported now
18+
19+
### Deprecated
20+
21+
- Trait `InstancesAccessorsTrait`
22+
723
## v2.2.0
824

925
### Added

Dockerfile

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
1-
FROM composer:1.8.6 AS composer
2-
3-
FROM php:7.2.0-alpine
1+
FROM php:7.2.5-alpine
42

53
ENV \
64
COMPOSER_ALLOW_SUPERUSER="1" \
75
COMPOSER_HOME="/tmp/composer"
86

9-
COPY --from=composer /usr/bin/composer /usr/bin/composer
7+
COPY --from=composer:1.10.7 /usr/bin/composer /usr/bin/composer
108

11-
RUN set -xe \
12-
&& apk add --no-cache binutils git curl \
13-
&& apk add --no-cache --virtual .build-deps autoconf pkgconf make g++ gcc \
9+
RUN set -x \
10+
&& apk add --no-cache binutils git \
11+
&& apk add --no-cache --virtual .build-deps autoconf pkgconf make g++ gcc 1>/dev/null \
1412
# install xdebug (for testing with code coverage), but do not enable it
15-
&& pecl install xdebug-2.9.1 \
13+
&& pecl install xdebug-2.9.1 1>/dev/null \
1614
&& apk del .build-deps \
1715
&& mkdir /src ${COMPOSER_HOME} \
1816
&& composer global require 'hirak/prestissimo' --no-interaction --no-suggest --prefer-dist \
@@ -23,5 +21,3 @@ RUN set -xe \
2321
&& php -m
2422

2523
WORKDIR /src
26-
27-
VOLUME ["/src"]

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# PHP developers tools
66

77
[![Version][badge_packagist_version]][link_packagist]
8-
[![Version][badge_php_version]][link_packagist]
8+
[![PHP Version][badge_php_version]][link_packagist]
99
[![Build Status][badge_build_status]][link_build_status]
1010
[![Coverage][badge_coverage]][link_coverage]
1111
[![Downloads count][badge_downloads_count]][link_packagist]
@@ -55,7 +55,7 @@ Bootstrap - это файл, который выполняется **перед
5555
#### Для Laravel-приложений
5656

5757
Написание кода по рекурсивному созданию директорий, соединению с БД может показаться вам довольно утомительным. Для того, чтобы упростить данную задачу вы можете создать свой класс `bootsrapper`-а, который умеет **поочередное** выполнение всех методов внутри себя, начинающихся с префикса `boot*` при создании собственного экземпляра. Более того - `$this->app` уже хранит инстанс вашего приложения (достаточно подключить нужный трейт). Взгляните на пример:
58-
58+
5959
```php
6060
<?php
6161

@@ -123,7 +123,7 @@ class MyBootstrap extends \AvtoDev\DevTools\Tests\Bootstrap\AbstractTestsBootstr
123123
`LaravelEventsAssertionsTrait` | Методы тестирования событий (events) и их слушателей (listeners)
124124
`LaravelLogFilesAssertsTrait` | Методы тестирования лог-файлов Laravel приложения
125125
`LaravelCommandsAssertionsTrait` | Методы тестирования Laravel artisan комманд
126-
`WithDatabaseQueriesLogging` | Подключая данный трейт в класс теста - все запросы к БД будут записываться в log-файл (класс теста должен наследоваться при этом от `AbstractLaravelTestCase`)
126+
`WithDatabaseQueriesLogging` | Подключая данный трейт в класс теста - все запросы к БД будут записываться в log-файл (класс теста должен наследоваться при этом от `AbstractLaravelTestCase`)
127127
`CarbonAssertionsTrait` | Методы для тестирования `Carbon`-объектов
128128
`WithDatabaseDisconnects` | Подключая данный трейт в класс теста - на `tearDown` происходит отключение от всех БД ([причина](https://www.neontsunami.com/posts/too-many-connections-using-phpunit-for-testing-laravel-51))
129129
`WithMemoryClean` | Подключая данный трейт в класс теста - на `tearDown` происходит очистка свойств класса. Для использования этого трейта вне `Laravel-framework` необходимо вызывать метод `clearMemory` на `tearDown` интересующего класса
@@ -163,7 +163,7 @@ This is open-sourced software licensed under the [MIT License][link_license].
163163

164164
[badge_packagist_version]:https://img.shields.io/packagist/v/avto-dev/dev-tools.svg?maxAge=180
165165
[badge_php_version]:https://img.shields.io/packagist/php-v/avto-dev/dev-tools.svg?longCache=true
166-
[badge_build_status]:https://travis-ci.org/avto-dev/dev-tools.svg?branch=master
166+
[badge_build_status]:https://img.shields.io/github/workflow/status/avto-dev/dev-tools/tests/master
167167
[badge_coverage]:https://img.shields.io/codecov/c/github/avto-dev/dev-tools/master.svg?maxAge=60
168168
[badge_downloads_count]:https://img.shields.io/packagist/dt/avto-dev/dev-tools.svg?maxAge=180
169169
[badge_license]:https://img.shields.io/packagist/l/avto-dev/dev-tools.svg?longCache=true

0 commit comments

Comments
 (0)