Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the ability to access alpha and beta versions of ACF #34

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
9cac3d3
Add the ability to access alpha and beta versions of ACF
Jan 11, 2019
69a311a
Update composer.json
jezemery Jan 11, 2019
04a7e0a
Allow for RC versions
Apr 11, 2019
6a310ad
Remove PHP 5.5 as it is deprecated
Apr 11, 2019
6b9e436
Update satooshi/php-coveralls requirement from 1.* to 2.*
dependabot-support May 23, 2019
7777427
Update squizlabs/php_codesniffer requirement from 2.* to 3.*
dependabot-support May 23, 2019
36f3e00
Merge pull request #1 from jezemery/dependabot/composer/satooshi/php-…
jezemery Oct 26, 2020
f561daa
Merge branch 'master' into dependabot/composer/squizlabs/php_codesnif…
jezemery Oct 26, 2020
85fbb73
Merge pull request #4 from jezemery/dependabot/composer/squizlabs/php…
jezemery Oct 26, 2020
dac734c
Update phpunit/phpunit requirement from 4.8.* to 5.7.*
dependabot-preview[bot] Oct 26, 2020
127e8f0
Merge pull request #10 from jezemery/dependabot/composer/phpunit/phpu…
jezemery Oct 26, 2020
2dd8da9
attempt to resolve latest set of errors caused by composer v2
jezemery Oct 26, 2020
12cdab4
Attempt to resolve install issue
jezemery Oct 26, 2020
dd28f3c
Use undocumented composer feature "plugin-modifies-downloads" see htt…
jezemery Oct 26, 2020
d0249e5
Add travis config for composer 2
jezemery Oct 26, 2020
2891c31
Add travis config for composer 2
jezemery Oct 26, 2020
8bcf699
v2.0.0
jezemery Oct 26, 2020
53fd883
Add support for latest version of vlucas/dotenv and remove outdated code
jezemery Oct 26, 2020
b59ec48
Merge pull request #19 from jezemery/dev
jezemery Oct 26, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add the ability to access alpha and beta versions of ACF
Jez Emery committed Jan 11, 2019
commit 9cac3d3ed8217eb2c49aecd0941ab82bf0374f58
3 changes: 2 additions & 1 deletion src/ACFProInstaller/Plugin.php
Original file line number Diff line number Diff line change
@@ -184,7 +184,8 @@ protected function validateVersion($version)
{
// \A = start of string, \Z = end of string
// See: http://stackoverflow.com/a/34994075
$major_minor_patch_optional = '/\A\d\.\d\.\d{1,2}(?:\.\d)?\Z/';
// Slight amendment added to allow for beta and alpha versions ( for testing purposes )
$major_minor_patch_optional = '/\A\d\.\d\.\d{1,2}(?:\.\d)?(\-)?(alpha|beta)?(\d)?\Z/';

if (!preg_match($major_minor_patch_optional, $version)) {
throw new \UnexpectedValueException(
5 changes: 5 additions & 0 deletions tests/ACFProInstaller/PluginTest.php
Original file line number Diff line number Diff line change
@@ -383,6 +383,11 @@ public function testExactVersionWithPatchDoubleDigitsPassesValidation()
{
$this->versionPassesValidationHelper('1.2.30');
}

public function testExactVersionWithPatchDoubleDigitsBetaVersionPassesValidation()
{
$this->versionPassesValidationHelper('1.2.30-beta3');
}

protected function versionFailsValidationHelper($version)
{