-
Notifications
You must be signed in to change notification settings - Fork 9
Added support for non-public enumeration constants #26
Changes from all commits
e44bec1
e7ece9c
a790c12
bec2991
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,30 +2,23 @@ language: php | |
|
||
matrix: | ||
include: | ||
- php: 5.3 | ||
dist: precise | ||
- php: 5.4 | ||
- php: 5.5 | ||
- php: 5.6 | ||
- php: 7.0 | ||
- php: 7.1 | ||
- php: 7.2 | ||
- php: 7.3 | ||
- php: nightly | ||
fast_finish: true | ||
allow_failures: | ||
- php: nightly | ||
|
||
before_install: | ||
- phpenv config-rm xdebug.ini || true | ||
- composer config --global github-oauth.github.com $GITHUB_TOKEN | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For whatever reason, this configuration setting is not available in the PHP 7.3 build. It should be removed anyway, however, since the invalid token was causing Composer to choke every time it tried to check out a package, stalling the build for longer than necessary. Not sure what this was doing here in the first place, considering one does not need a token to download public packages. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It used to be the case that Composer would hit GitHub API rate limits when running under Travis CI because of the fact that GitHub counted every request coming from every In 2016 a change was made to GitHub's infrastructure to remove the rate limit, so it's no longer necessary: composer/composer#4884 (comment) I think you can probably get rid of the secure environment variable in |
||
install: composer install --prefer-dist --no-progress --no-interaction | ||
install: composer install --no-progress --no-interaction | ||
script: scripts/travis | ||
after_script: scripts/travis-after | ||
|
||
env: | ||
global: | ||
- ELOQUENT_PUBLISH_VERSION=7.1 | ||
- secure: "kK6XSHAaOLavtUZthJr3+VpsCedSrf0eJXz+lit/i2weg8g7RrReo2Ta/pWhzS3aP6mHkRKyB4UzMVebuFOoHuJkn+WGgnVUp1YhmL9F9wK4rzJQlGDmcwpSI3v6G69Mzm10o1v4ZVtAlaDD7MzbkTC8bw/Vg2BYeRZ8jFCzI7U=" | ||
|
||
cache: | ||
directories: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
} | ||
], | ||
"require": { | ||
"php": ">=5.3" | ||
"php": ">=7.1" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "^4" | ||
|
@@ -27,7 +27,7 @@ | |
}, | ||
"config": { | ||
"platform": { | ||
"php": "5.3.99" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd prefer to update this instead of deleting it. The new value should be Having it here ensures that even if I run There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Libraries shouldn't have a lock file to begin with. I didn't remove the lock file because I'm trying to keep this PR as focused as possible, but if you insist, I will put this back in. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd appreciate it. I'm aware of the arguments against committing lock files, but it's not something I want to change in this PR, if at all. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, it's done. |
||
"php": "7.1.99" | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
use Eloquent\Enumeration\AbstractEnumeration; | ||
|
||
/** | ||
* An enumeration whose members have different accessibility levels. | ||
* | ||
* @method static IMPLICIT_PUBLIC() | ||
* @method static EXPLICIT_PUBLIC() | ||
*/ | ||
final class MixedAccessibilityEnumeration extends AbstractEnumeration | ||
{ | ||
const IMPLICIT_PUBLIC = 'IMPLICIT_PUBLIC'; | ||
public const EXPLICIT_PUBLIC = 'EXPLICIT_PUBLIC'; | ||
protected const PROTECTED = 'PROTECTED'; | ||
private const PRIVATE = 'PRIVATE'; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 👍