Skip to content

Commit 90057cb

Browse files
committed
Merge remote-tracking branch 'remotes/origin/master' into issue-309
# Conflicts: # src/Translatable/Translatable.php # tests/TranslatableTest.php
2 parents c29cd20 + f3e3763 commit 90057cb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1955
-905
lines changed

.circleci/config.yml

Lines changed: 181 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,193 @@
1+
defaults: &defaults
2+
steps:
3+
# PHP
4+
- run:
5+
name: 'Install PHP extensions'
6+
command: 'sudo docker-php-ext-install pdo_mysql'
7+
8+
# Database
9+
- run:
10+
name: 'Wait for database'
11+
command: 'dockerize -wait tcp://localhost:3306 -timeout 1m'
12+
- run:
13+
name: 'Install MySQL-Client'
14+
command: 'sudo apt install -y mysql-client'
15+
16+
- run:
17+
name: 'MySQL Database'
18+
command: 'mysql -h 127.0.0.1 -u root -e "CREATE DATABASE translatable_test; CREATE DATABASE translatable_test2;"'
19+
20+
- run:
21+
name: 'MySQL User'
22+
command: 'mysql -h 127.0.0.1 -u root -e "CREATE USER ''homestead''@''%'' IDENTIFIED BY ''secret''; GRANT ALL PRIVILEGES ON *.* TO ''homestead''@''%''; FLUSH PRIVILEGES;"'
23+
24+
- checkout
25+
26+
# Composer
27+
- run:
28+
name: 'Composer self-update'
29+
command: 'sudo composer self-update'
30+
31+
- restore_cache:
32+
keys:
33+
- 'composer-v1-{{ checksum "composer.json" }}'
34+
35+
- run:
36+
name: 'Composer set laravel-version'
37+
command: |
38+
composer require laravel/framework:$LARAVEL_VERSION --dev --no-update --no-interaction
39+
40+
- run:
41+
name: 'Composer install'
42+
command: 'composer update -n --prefer-dist --no-suggest --no-interaction'
43+
44+
- save_cache:
45+
paths:
46+
- './vendor'
47+
key: 'composer-v1-{{ checksum "composer.json" }}'
48+
49+
# Tests
50+
- run:
51+
name: 'PHPUnit'
52+
command: './vendor/bin/phpunit --coverage-clover=coverage.clover'
53+
54+
- run:
55+
name: 'Install Scrutinizer Ocular'
56+
command: 'wget https://scrutinizer-ci.com/ocular.phar'
57+
58+
- run:
59+
name: 'Scrutinizer Ocular'
60+
command: 'php ocular.phar code-coverage:upload --format=php-clover coverage.clover'
61+
62+
163
version: 2
264

365
jobs:
466
build:
67+
docker:
68+
- image: 'circleci/php:latest'
69+
environment:
70+
LARAVEL_VERSION: '@stable'
71+
- image: 'circleci/mysql:5.7'
72+
command: 'mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_bin --innodb-large-prefix=true --innodb-file-format=Barracuda'
73+
environment:
74+
MYSQL_USER: 'root'
75+
MYSQL_ALLOW_EMPTY_PASSWORD: true
76+
<<: *defaults
77+
78+
build-php73-laravel58:
79+
docker:
80+
- image: 'circleci/php:7.3'
81+
environment:
82+
LARAVEL_VERSION: '5.8.*'
83+
- image: 'circleci/mysql:5.7'
84+
command: 'mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_bin --innodb-large-prefix=true --innodb-file-format=Barracuda'
85+
environment:
86+
MYSQL_USER: 'root'
87+
MYSQL_ALLOW_EMPTY_PASSWORD: true
88+
<<: *defaults
89+
90+
build-php72-laravel58:
91+
docker:
92+
- image: 'circleci/php:7.2'
93+
environment:
94+
LARAVEL_VERSION: '5.8.*'
95+
- image: 'circleci/mysql:5.7'
96+
command: 'mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_bin --innodb-large-prefix=true --innodb-file-format=Barracuda'
97+
environment:
98+
MYSQL_USER: 'root'
99+
MYSQL_ALLOW_EMPTY_PASSWORD: true
100+
<<: *defaults
101+
102+
build-php71-laravel58:
5103
docker:
6104
- image: 'circleci/php:7.1'
105+
environment:
106+
LARAVEL_VERSION: '5.8.*'
107+
- image: 'circleci/mysql:5.7'
108+
command: 'mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_bin --innodb-large-prefix=true --innodb-file-format=Barracuda'
109+
environment:
110+
MYSQL_USER: 'root'
111+
MYSQL_ALLOW_EMPTY_PASSWORD: true
112+
<<: *defaults
113+
114+
build-php73-laravel57:
115+
docker:
116+
- image: 'circleci/php:7.3'
117+
environment:
118+
LARAVEL_VERSION: '5.7.*'
119+
- image: 'circleci/mysql:5.7'
120+
command: 'mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_bin --innodb-large-prefix=true --innodb-file-format=Barracuda'
121+
environment:
122+
MYSQL_USER: 'root'
123+
MYSQL_ALLOW_EMPTY_PASSWORD: true
124+
<<: *defaults
125+
126+
build-php72-laravel57:
127+
docker:
128+
- image: 'circleci/php:7.2'
129+
environment:
130+
LARAVEL_VERSION: '5.7.*'
131+
- image: 'circleci/mysql:5.7'
132+
command: 'mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_bin --innodb-large-prefix=true --innodb-file-format=Barracuda'
133+
environment:
134+
MYSQL_USER: 'root'
135+
MYSQL_ALLOW_EMPTY_PASSWORD: true
136+
<<: *defaults
137+
138+
build-php71-laravel57:
139+
docker:
140+
- image: 'circleci/php:7.1'
141+
environment:
142+
LARAVEL_VERSION: '5.7.*'
143+
- image: 'circleci/mysql:5.7'
144+
command: 'mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_bin --innodb-large-prefix=true --innodb-file-format=Barracuda'
145+
environment:
146+
MYSQL_USER: 'root'
147+
MYSQL_ALLOW_EMPTY_PASSWORD: true
148+
<<: *defaults
149+
150+
build-php73-laravel56:
151+
docker:
152+
- image: 'circleci/php:7.3'
153+
environment:
154+
LARAVEL_VERSION: '5.6.*'
155+
- image: 'circleci/mysql:5.7'
156+
command: 'mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_bin --innodb-large-prefix=true --innodb-file-format=Barracuda'
157+
environment:
158+
MYSQL_USER: 'root'
159+
MYSQL_ALLOW_EMPTY_PASSWORD: true
160+
<<: *defaults
161+
162+
build-php72-laravel56:
163+
docker:
164+
- image: 'circleci/php:7.2'
165+
environment:
166+
LARAVEL_VERSION: '5.6.*'
167+
- image: 'circleci/mysql:5.7'
168+
command: 'mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_bin --innodb-large-prefix=true --innodb-file-format=Barracuda'
169+
environment:
170+
MYSQL_USER: 'root'
171+
MYSQL_ALLOW_EMPTY_PASSWORD: true
172+
<<: *defaults
173+
174+
build-php71-laravel56:
175+
docker:
176+
- image: 'circleci/php:7.1'
177+
environment:
178+
LARAVEL_VERSION: '5.6.*'
7179
- image: 'circleci/mysql:5.7'
8180
command: 'mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_bin --innodb-large-prefix=true --innodb-file-format=Barracuda'
9181
environment:
10182
MYSQL_USER: 'root'
11183
MYSQL_ALLOW_EMPTY_PASSWORD: true
184+
<<: *defaults
12185

13-
steps:
14-
# PHP
15-
- run:
16-
name: 'Install PHP extensions'
17-
command: 'sudo docker-php-ext-install pdo_mysql'
18-
19-
# Database
20-
- run:
21-
name: 'Wait for database'
22-
command: 'dockerize -wait tcp://localhost:3306 -timeout 1m'
23-
- run:
24-
name: 'Install MySQL-Client'
25-
command: 'sudo apt install -y mysql-client'
26-
27-
- run:
28-
name: 'MySQL Database'
29-
command: 'mysql -h 127.0.0.1 -u root -e "CREATE DATABASE translatable_test; CREATE DATABASE translatable_test2;"'
30-
31-
- run:
32-
name: 'MySQL User'
33-
command: 'mysql -h 127.0.0.1 -u root -e "CREATE USER ''homestead''@''%'' IDENTIFIED BY ''secret''; GRANT ALL PRIVILEGES ON *.* TO ''homestead''@''%''; FLUSH PRIVILEGES;"'
34-
35-
- checkout
36-
37-
# Composer
38-
- run:
39-
name: 'Composer self-update'
40-
command: 'composer self-update'
41-
42-
- restore_cache:
43-
keys:
44-
- 'composer-v1-{{ checksum "composer.json" }}'
45-
46-
- run:
47-
name: 'Composer install'
48-
command: 'composer update -n --prefer-dist --no-suggest --no-interaction'
49-
50-
- save_cache:
51-
paths:
52-
- './vendor'
53-
key: 'composer-v1-{{ checksum "composer.json" }}'
54-
55-
# Tests
56-
- run:
57-
name: 'PHPUnit'
58-
command: './vendor/bin/phpunit --coverage-clover=coverage.clover'
59-
60-
- run:
61-
name: 'Install Scrutinizer Ocular'
62-
command: 'wget https://scrutinizer-ci.com/ocular.phar'
63-
64-
- run:
65-
name: 'Scrutinizer Ocular'
66-
command: 'php ocular.phar code-coverage:upload --format=php-clover coverage.clover'
186+
workflows:
187+
version: 2
188+
build_all:
189+
jobs:
190+
- build-php73-laravel58
191+
- build-php72-laravel58
192+
- build-php72-laravel57
193+
- build-php72-laravel56

.gitbook.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
root: ./docs
2+
3+
structure:
4+
readme: README.md
5+
summary: SUMMARY.md
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: "\U0001F41E Bug report"
3+
about: Create a bug report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Things needed to reproduce the error.
15+
eg: Configuration, Migration, Model, Controller/Command
16+
17+
**Expected behavior**
18+
A clear and concise description of what you expected to happen.
19+
20+
**Screenshots**
21+
If applicable, add screenshots to help explain your problem.
22+
23+
**Versions (please complete the following information):**
24+
- PHP:
25+
- Database:
26+
- Laravel:
27+
- Package:
28+
29+
**Additional context**
30+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: "\U0001F680 Feature request"
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: feature
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
name: "\U0001F4AC Support Question"
3+
about: General questions related to this package
4+
title: ''
5+
labels: question
6+
assignees: ''
7+
8+
---

.scrutinizer.yml

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
11
checks:
2-
php: true
2+
php: true
33

44
build:
5-
environment:
6-
php:
7-
version: 7.0.8
8-
dependencies:
9-
before:
10-
- sudo composer self-update
11-
- mysql -e 'create database translatable_test;'
12-
- echo "CREATE USER 'homestead'@'localhost' IDENTIFIED BY 'secret'; \n GRANT ALL PRIVILEGES ON * . * TO 'homestead'@'localhost'; \nFLUSH PRIVILEGES; \n" | mysql -u root
13-
-
14-
command: 'composer install --prefer-dist'
15-
idle_timeout: 1200
16-
tests:
17-
override:
18-
-
19-
command: echo 1
5+
environment:
6+
php:
7+
version: 7.3.0
8+
dependencies:
9+
before:
10+
- mysql -e 'create database translatable_test;'
11+
- echo "CREATE USER 'homestead'@'localhost' IDENTIFIED BY 'secret'; \n GRANT ALL PRIVILEGES ON * . * TO 'homestead'@'localhost'; \nFLUSH PRIVILEGES; \n" | mysql -u root
12+
tests:
13+
override:
14+
- command: echo 1
15+
2016
tools:
21-
external_code_coverage:
22-
timeout: 3600
17+
external_code_coverage:
18+
timeout: 3600
19+
runs: 4

LICENSE

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2014 Dimitrios Savvopoulos [email protected]
3+
Copyright (c) 2019 Astrotomic / Gummibeer <[email protected]>
4+
Copyright (c) 2014 - 2019 Dimitrios Savvopoulos <[email protected]>
45

56
Permission is hereby granted, free of charge, to any person obtaining a copy of
67
this software and associated documentation files (the "Software"), to deal in

0 commit comments

Comments
 (0)