diff --git a/.env b/.env index 4c093b4..1adfa20 100644 --- a/.env +++ b/.env @@ -1,6 +1,6 @@ -# ----------------------------------------------------------------------------- +# ------------------------------------------------------------------------------ ### Docker -# ----------------------------------------------------------------------------- +# ------------------------------------------------------------------------------ # # All containers @@ -12,4 +12,4 @@ DOCKER_CONTAINER_PROJECT=common-library # PHP configuration: # - timezone # -TIMEZONE=Europe/Warsaw +PHP_DATE_TIMEZONE=Europe/London diff --git a/.gitignore b/.gitignore index 1717b0b..52730bb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,61 +1,79 @@ # ------------------------------------------------------------------------------ -### Vendors +### Linux template # ------------------------------------------------------------------------------ -/vendor/ +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* # ------------------------------------------------------------------------------ -### Composer +### macOS template # ------------------------------------------------------------------------------ -/composer.lock -/composer.phar +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk # ------------------------------------------------------------------------------ -### Phing +### Windows template # ------------------------------------------------------------------------------ -/phing/properties +# Windows thumbnail cache files +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db +# Dump file +*.stackdump -# ------------------------------------------------------------------------------ -### PHPUnit -# ------------------------------------------------------------------------------ -/phpunit.xml -/.phpunit.result.cache +# Folder config file +[Dd]esktop.ini +# Recycle Bin used on file shares +$RECYCLE.BIN/ -# ------------------------------------------------------------------------------ -### Infection -# ------------------------------------------------------------------------------ -/infection.json +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp - -# ------------------------------------------------------------------------------ -### PHP Coding Standards Fixer -# ------------------------------------------------------------------------------ -/.php_cs -/.php_cs.cache - - -# ------------------------------------------------------------------------------ -### PHP_CodeSniffer -# ------------------------------------------------------------------------------ -/.phpcs-cache -/phpcs.xml - - -# ----------------------------------------------------------------------------- -### Build files -# ----------------------------------------------------------------------------- -/build/ - - -# ------------------------------------------------------------------------------ -### Generated databases -# ------------------------------------------------------------------------------ -/data/tmp -*.sql -*.sqlite +# Windows shortcuts +*.lnk # ------------------------------------------------------------------------------ @@ -130,79 +148,57 @@ fabric.properties # Android studio 3.1+ serialized cache file .idea/caches/build_file_checksums.ser + # ------------------------------------------------------------------------------ -### macOS template +### Build files # ------------------------------------------------------------------------------ -# General -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk +/build/ # ------------------------------------------------------------------------------ -### Linux template +### Phing # ------------------------------------------------------------------------------ -*~ - -# temporary files which can be created if a process still has a handle open of a deleted file -.fuse_hidden* - -# KDE directory preferences -.directory - -# Linux trash folder which might appear on any partition or disk -.Trash-* - -# .nfs files are created when an open file is removed but is still being accessed -.nfs* +/phing/properties # ------------------------------------------------------------------------------ -### Windows template +### Infection # ------------------------------------------------------------------------------ -# Windows thumbnail cache files -Thumbs.db -Thumbs.db:encryptable -ehthumbs.db -ehthumbs_vista.db +/infection.json -# Dump file -*.stackdump -# Folder config file -[Dd]esktop.ini +# ------------------------------------------------------------------------------ +### Temporary data & databases +# ------------------------------------------------------------------------------ +/data/tmp +*.sqlite -# Recycle Bin used on file shares -$RECYCLE.BIN/ -# Windows Installer files -*.cab -*.msi -*.msix -*.msm -*.msp +# ------------------------------------------------------------------------------ +### Composer & vendors +# ------------------------------------------------------------------------------ +/composer.lock +/composer.phar +/vendor/ -# Windows shortcuts -*.lnk + +# ------------------------------------------------------------------------------ +### PHPUnit +# ------------------------------------------------------------------------------ +/phpunit.xml +/.phpunit.result.cache +/tests/Resources/var + + +# ------------------------------------------------------------------------------ +### PHP Coding Standards Fixer +# ------------------------------------------------------------------------------ +/.php_cs +/.php_cs.cache + + +# ------------------------------------------------------------------------------ +### PHP_CodeSniffer +# ------------------------------------------------------------------------------ +/.phpcs-cache +/phpcs.xml diff --git a/CHANGELOG.md b/CHANGELOG.md index b30d4fd..f0876a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ Common and useful classes, methods, exceptions etc. 3. composer > squizlabs/php_codesniffer package > use ^3.4 (instead of ^2.9) 4. Do not require name of class by BaseTestCaseTrait::assertMethodVisibilityAndArguments() method 5. PHP CS Fixer > configuration > make more readable & remove unnecessary code +6. Update .gitignore, docker-compose.yml, phpunit.xml.dist # 1.0.5 diff --git a/docker-compose.yml b/docker-compose.yml index 8c2c204..3b4cd6a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,7 +10,7 @@ services: entrypoint: php command: -S 0.0.0.0:9999 environment: - TIMEZONE: ${TIMEZONE} + PHP_DATE_TIMEZONE: ${PHP_DATE_TIMEZONE} volumes: - .:/var/www/application:cached composer: diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 2478270..13fe570 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,14 +1,13 @@ - - + @@ -16,13 +15,13 @@ - tests/ + tests - src/ + src