From 19e9ff5f46098817c8b933f05aa01db3015f75eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20Petr=C3=A1k?= Date: Thu, 17 Sep 2020 12:07:38 +0200 Subject: [PATCH 1/3] Bileto package and namespace --- README.md | 2 +- composer.json | 15 ++++++++++----- license.txt | 2 +- src/CriticalSection/CriticalSection.php | 6 +++--- src/CriticalSection/Driver/FileDriver.php | 4 ++-- src/CriticalSection/Driver/IDriver.php | 2 +- src/CriticalSection/Driver/PdoMysqlDriver.php | 2 +- src/CriticalSection/Driver/PdoPgsqlDriver.php | 2 +- src/CriticalSection/Driver/RedisDriver.php | 4 ++-- src/CriticalSection/Driver/SemaphoreDriver.php | 2 +- .../Exception/CriticalSectionException.php | 2 +- .../Exception/RuntimeException.php | 2 +- src/CriticalSection/ICriticalSection.php | 2 +- tests/CriticalSectionTests/CriticalSection.phpt | 6 +++--- tests/CriticalSectionTests/Driver/FileDriver.phpt | 6 +++--- .../Driver/PdoMysqlDriver.phpt | 4 ++-- .../Driver/PdoPgsqlDriver.phpt | 4 ++-- .../CriticalSectionTests/Driver/RedisDriver.phpt | 6 +++--- .../Driver/SemaphoreDriver.phpt | 4 ++-- 19 files changed, 41 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index ecdf4c7..a1db236 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# CriticalSection [![Build Status](https://travis-ci.org/stekycz/CriticalSection.svg?branch=master)](https://travis-ci.org/stekycz/CriticalSection) +# CriticalSection [![Build Status](https://travis-ci.org/bileto/CriticalSection.svg?branch=master)](https://travis-ci.org/bileto/CriticalSection) ## Description diff --git a/composer.json b/composer.json index 2982d86..540c22f 100644 --- a/composer.json +++ b/composer.json @@ -1,10 +1,15 @@ { - "name": "stekycz/critical-section", + "name": "bileto/critical-section", "type": "library", "description": "Lightweight class supporting critical section locking", "keywords": ["parallel", "critical-section", "locks"], "license": "MIT", "authors": [ + { + "name": "Josef Petrák", + "email": "me@jspetrak.name", + "role": "Developer" + }, { "name": "Martin Štekl", "email": "martin.stekl@gmail.com", @@ -12,9 +17,9 @@ } ], "support": { - "email": "martin.stekl@gmail.com", - "issues": "https://github.com/stekycz/CriticalSection/issues", - "source": "https://github.com/stekycz/CriticalSection" + "email": "development@bileto.com", + "issues": "https://github.com/bileto/CriticalSection/issues", + "source": "https://github.com/bileto/CriticalSection" }, "require": { "php": ">=7.0.0" @@ -30,7 +35,7 @@ }, "autoload": { "psr-4": { - "stekycz\\": "src" + "Bileto\\": "src" } } } diff --git a/license.txt b/license.txt index d403d93..74e3bfd 100644 --- a/license.txt +++ b/license.txt @@ -1,4 +1,4 @@ -Copyright (c) 2017 Martin Štekl +Copyright (c) 2020 BTO software technologies s.r.o. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation diff --git a/src/CriticalSection/CriticalSection.php b/src/CriticalSection/CriticalSection.php index 133bdee..9219f34 100644 --- a/src/CriticalSection/CriticalSection.php +++ b/src/CriticalSection/CriticalSection.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace stekycz\CriticalSection; +namespace Bileto\CriticalSection; -use stekycz\CriticalSection\Driver\IDriver; -use stekycz\CriticalSection\Exception\RuntimeException; +use Bileto\CriticalSection\Driver\IDriver; +use Bileto\CriticalSection\Exception\RuntimeException; use Throwable; final class CriticalSection implements ICriticalSection diff --git a/src/CriticalSection/Driver/FileDriver.php b/src/CriticalSection/Driver/FileDriver.php index 63d85eb..677739a 100644 --- a/src/CriticalSection/Driver/FileDriver.php +++ b/src/CriticalSection/Driver/FileDriver.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace stekycz\CriticalSection\Driver; +namespace Bileto\CriticalSection\Driver; -use stekycz\CriticalSection\Exception\CriticalSectionException; +use Bileto\CriticalSection\Exception\CriticalSectionException; class FileDriver implements IDriver { diff --git a/src/CriticalSection/Driver/IDriver.php b/src/CriticalSection/Driver/IDriver.php index b321569..b4b87b3 100644 --- a/src/CriticalSection/Driver/IDriver.php +++ b/src/CriticalSection/Driver/IDriver.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace stekycz\CriticalSection\Driver; +namespace Bileto\CriticalSection\Driver; interface IDriver { diff --git a/src/CriticalSection/Driver/PdoMysqlDriver.php b/src/CriticalSection/Driver/PdoMysqlDriver.php index c71499e..5d4563a 100644 --- a/src/CriticalSection/Driver/PdoMysqlDriver.php +++ b/src/CriticalSection/Driver/PdoMysqlDriver.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace stekycz\CriticalSection\Driver; +namespace Bileto\CriticalSection\Driver; use PDO; diff --git a/src/CriticalSection/Driver/PdoPgsqlDriver.php b/src/CriticalSection/Driver/PdoPgsqlDriver.php index 4687484..e766028 100644 --- a/src/CriticalSection/Driver/PdoPgsqlDriver.php +++ b/src/CriticalSection/Driver/PdoPgsqlDriver.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace stekycz\CriticalSection\Driver; +namespace Bileto\CriticalSection\Driver; use PDO; diff --git a/src/CriticalSection/Driver/RedisDriver.php b/src/CriticalSection/Driver/RedisDriver.php index 29072ae..e6fc1ce 100644 --- a/src/CriticalSection/Driver/RedisDriver.php +++ b/src/CriticalSection/Driver/RedisDriver.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace stekycz\CriticalSection\Driver; +namespace Bileto\CriticalSection\Driver; use Redis; -use stekycz\CriticalSection\Exception\CriticalSectionException; +use Bileto\CriticalSection\Exception\CriticalSectionException; use Throwable; class RedisDriver implements IDriver diff --git a/src/CriticalSection/Driver/SemaphoreDriver.php b/src/CriticalSection/Driver/SemaphoreDriver.php index 75846c6..efbb2c7 100644 --- a/src/CriticalSection/Driver/SemaphoreDriver.php +++ b/src/CriticalSection/Driver/SemaphoreDriver.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace stekycz\CriticalSection\Driver; +namespace Bileto\CriticalSection\Driver; /** * This driver works correctly in single system environment only because semaphores are not shared on different diff --git a/src/CriticalSection/Exception/CriticalSectionException.php b/src/CriticalSection/Exception/CriticalSectionException.php index 5cfc57c..9162aab 100644 --- a/src/CriticalSection/Exception/CriticalSectionException.php +++ b/src/CriticalSection/Exception/CriticalSectionException.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace stekycz\CriticalSection\Exception; +namespace Bileto\CriticalSection\Exception; class CriticalSectionException extends RuntimeException { diff --git a/src/CriticalSection/Exception/RuntimeException.php b/src/CriticalSection/Exception/RuntimeException.php index e4c8a38..5af15a0 100644 --- a/src/CriticalSection/Exception/RuntimeException.php +++ b/src/CriticalSection/Exception/RuntimeException.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace stekycz\CriticalSection\Exception; +namespace Bileto\CriticalSection\Exception; class RuntimeException extends \RuntimeException { diff --git a/src/CriticalSection/ICriticalSection.php b/src/CriticalSection/ICriticalSection.php index 925179f..73867a5 100644 --- a/src/CriticalSection/ICriticalSection.php +++ b/src/CriticalSection/ICriticalSection.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace stekycz\CriticalSection; +namespace Bileto\CriticalSection; interface ICriticalSection { diff --git a/tests/CriticalSectionTests/CriticalSection.phpt b/tests/CriticalSectionTests/CriticalSection.phpt index b6dee04..7c4a2eb 100644 --- a/tests/CriticalSectionTests/CriticalSection.phpt +++ b/tests/CriticalSectionTests/CriticalSection.phpt @@ -6,12 +6,12 @@ declare(strict_types=1); * @testCase */ -namespace stekycz\CriticalSection\tests; +namespace Bileto\CriticalSection\tests; use Mockery; use Redis; -use stekycz\CriticalSection\CriticalSection; -use stekycz\CriticalSection\Driver\IDriver; +use Bileto\CriticalSection\CriticalSection; +use Bileto\CriticalSection\Driver\IDriver; use TestCase; use Tester\Assert; diff --git a/tests/CriticalSectionTests/Driver/FileDriver.phpt b/tests/CriticalSectionTests/Driver/FileDriver.phpt index 69bf31e..341024c 100644 --- a/tests/CriticalSectionTests/Driver/FileDriver.phpt +++ b/tests/CriticalSectionTests/Driver/FileDriver.phpt @@ -6,10 +6,10 @@ declare(strict_types=1); * @testCase */ -namespace stekycz\CriticalSection\tests\Driver; +namespace Bileto\CriticalSection\tests\Driver; -use stekycz\CriticalSection\Driver\FileDriver; -use stekycz\CriticalSection\Exception\CriticalSectionException; +use Bileto\CriticalSection\Driver\FileDriver; +use Bileto\CriticalSection\Exception\CriticalSectionException; use TestCase; use Tester\Assert; diff --git a/tests/CriticalSectionTests/Driver/PdoMysqlDriver.phpt b/tests/CriticalSectionTests/Driver/PdoMysqlDriver.phpt index 680fdbc..b8611bf 100644 --- a/tests/CriticalSectionTests/Driver/PdoMysqlDriver.phpt +++ b/tests/CriticalSectionTests/Driver/PdoMysqlDriver.phpt @@ -6,12 +6,12 @@ declare(strict_types=1); * @testCase */ -namespace stekycz\CriticalSection\tests\Driver; +namespace Bileto\CriticalSection\tests\Driver; use Mockery; use PDO; use PDOStatement; -use stekycz\CriticalSection\Driver\PdoMysqlDriver; +use Bileto\CriticalSection\Driver\PdoMysqlDriver; use TestCase; use Tester\Assert; diff --git a/tests/CriticalSectionTests/Driver/PdoPgsqlDriver.phpt b/tests/CriticalSectionTests/Driver/PdoPgsqlDriver.phpt index 363089c..1221df5 100644 --- a/tests/CriticalSectionTests/Driver/PdoPgsqlDriver.phpt +++ b/tests/CriticalSectionTests/Driver/PdoPgsqlDriver.phpt @@ -6,12 +6,12 @@ declare(strict_types=1); * @testCase */ -namespace stekycz\CriticalSection\tests\Driver; +namespace Bileto\CriticalSection\tests\Driver; use Mockery; use PDO; use PDOStatement; -use stekycz\CriticalSection\Driver\PdoPgsqlDriver; +use Bileto\CriticalSection\Driver\PdoPgsqlDriver; use TestCase; use Tester\Assert; diff --git a/tests/CriticalSectionTests/Driver/RedisDriver.phpt b/tests/CriticalSectionTests/Driver/RedisDriver.phpt index 9a201a8..7936d3e 100644 --- a/tests/CriticalSectionTests/Driver/RedisDriver.phpt +++ b/tests/CriticalSectionTests/Driver/RedisDriver.phpt @@ -6,13 +6,13 @@ declare(strict_types=1); * @testCase */ -namespace stekycz\CriticalSection\tests\Driver; +namespace Bileto\CriticalSection\tests\Driver; use Exception; use Mockery; use Redis; -use stekycz\CriticalSection\Driver\RedisDriver; -use stekycz\CriticalSection\Exception\CriticalSectionException; +use Bileto\CriticalSection\Driver\RedisDriver; +use Bileto\CriticalSection\Exception\CriticalSectionException; use TestCase; use Tester\Assert; diff --git a/tests/CriticalSectionTests/Driver/SemaphoreDriver.phpt b/tests/CriticalSectionTests/Driver/SemaphoreDriver.phpt index 1e4c38c..fa86c73 100644 --- a/tests/CriticalSectionTests/Driver/SemaphoreDriver.phpt +++ b/tests/CriticalSectionTests/Driver/SemaphoreDriver.phpt @@ -6,9 +6,9 @@ declare(strict_types=1); * @testCase */ -namespace stekycz\CriticalSection\tests\Driver; +namespace Bileto\CriticalSection\tests\Driver; -use stekycz\CriticalSection\Driver\SemaphoreDriver; +use Bileto\CriticalSection\Driver\SemaphoreDriver; use TestCase; use Tester\Assert; From 89298cd3015eeff8c012ac20d11cce2a513a2a42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20Petr=C3=A1k?= Date: Thu, 17 Sep 2020 12:11:45 +0200 Subject: [PATCH 2/3] Travis CI: remove PHP 7.0 --- .travis.yml | 4 +++- README.md | 2 +- composer.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1b9dd6e..bbd885d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,8 +5,10 @@ cache: - $HOME/.composer/cache php: - - 7.0 - 7.1 + - 7.2 + - 7.3 + - 7.4 services: - redis-server diff --git a/README.md b/README.md index a1db236..c490866 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,4 @@ Lightweight class supporting critical section locking. -It requires **PHP >= 7.0.0**. +It requires **PHP >= 7.1**. diff --git a/composer.json b/composer.json index 540c22f..a591f4b 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "source": "https://github.com/bileto/CriticalSection" }, "require": { - "php": ">=7.0.0" + "php": ">=7.1" }, "suggest": { "ext-redis": "The php redis extension https://github.com/nicolasff/phpredis/ is required for connecting to redis server" From ac918f528fa6ac345fbf4c8bb7f10acd1b9ddd75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20Petr=C3=A1k?= Date: Thu, 17 Sep 2020 12:17:11 +0200 Subject: [PATCH 3/3] Travis CI: do not support PHP 7.4 yet --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index bbd885d..fcebe3e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,6 @@ php: - 7.1 - 7.2 - 7.3 - - 7.4 services: - redis-server