Commit Graph

661 Commits

Author SHA1 Message Date
peter279k 8fab36d995 Use class-based PHPUnit namespace 2018-04-25 18:43:33 +08:00
Ben Ramsey 1f55a65f51 Pin goaop/framework to less than v2.2, so that builds start passing 2018-03-23 11:28:09 -04:00
Ben Ramsey 79e56bc162 Exclude docs, tests, tools from GitHub language statistics 2018-03-23 11:03:46 -04:00
Ben Peachey 62628862df Improvements to the SystemNodeProviderTest class (#211)
* Changes location of providers in the SystemNodeProviderTest

  They are now grouped at the bottom of the class.

* Adds logic to SystemNodeProviderTest.

* Changes call to `file_get_contents` SystemNodeProvider so it can be
  mocked.

* Changes SystemNodeProviderTest so native PHP functions are mocked
  instead of the class under test.

* Changes SystemNodeProviderTest so "\n" is used instead of PHP_EOL

  As the (input or output) of the tests is not system dependant it does
  not make sense to use PHP_EOL. All of these instance have been
  replaced for the sake of readability and stating intent more clearly.

* Adds dataprovider to SystemNodeProvider main test for input
  variations.

* Adds OS to SystemNodeProviderTest dataprovider for Linux fail
  scenario.

* Adds test for SystemNodeProvider to ensure invalid values are not
  accepted.

* Changes names of dataproviders in SystemNodeProviderTest for
  consistency.

* Changes SystemNodeProviderTest by grouping dataproviders together.

* Changes method in SystemNodeProviderTest to use the provided mock
  functions.

* Fixes PSR-2 coding conventions in SystemNodeProviderTest.

* Minor change to SystemNodeProviderTest based on review.
2018-02-07 17:28:02 -06:00
Ben Ramsey a7a286e5c2 Merge pull request #209 from vinkla/patch-1
Exclude docs from production
2018-01-21 10:56:55 -06:00
Vincent Klaiber 895cd766b6 Update .gitattributes 2018-01-21 17:53:12 +01:00
Vincent Klaiber c1fb254784 Update .gitattributes 2018-01-21 17:52:47 +01:00
Vincent Klaiber 9fef35e028 Exclude docs and markdown files
Added .md files and the docs directory to be excluded in production.
2018-01-21 14:19:56 +01:00
Ben Ramsey 44abcdad87 Update CHANGELOG for the 3.7.3 release 3.7.3 2018-01-19 18:28:24 -06:00
Ben Ramsey 9230e78a59 Merge pull request #206 from 1ma/timegen-fix
Fix for DefaultTimeGenerator
2018-01-19 17:50:16 -06:00
Marcel Hernandez 76efebe0ac generate random clockSeq with random_int() instead of mt_rand() 2018-01-19 16:17:49 -06:00
Marcel Hernandez 3567caf3f9 fixed off-by-one error on DefaultTimeGenerator 2018-01-19 16:17:36 -06:00
Ben Ramsey 8727e30fb5 Bump release date for 3.7.3 to 19 January 2018 2018-01-19 16:00:42 -06:00
Ben Ramsey f203f13921 Fix broken build on PHP 5.4 2018-01-19 16:00:06 -06:00
Ben Ramsey 7575e4f2b5 Add initial documentation structure for Read the Docs 2018-01-16 20:08:52 -06:00
Ben Ramsey e67d6bfdc2 Revert to pre-1.x series of mockery/mockery for ramsey/uuid 3.x 2018-01-16 19:45:47 -06:00
Ben Ramsey 4f8e6f6c40 Add CHANGELOG notes for version 3.7.3 2018-01-16 14:19:53 -06:00
Ben Ramsey 89c3c1777e Fix capitalization of the getSysfs() method 2018-01-16 14:14:34 -06:00
Ben Ramsey 901c3e540d Handle cases where glob() returns false
Fixes #203
2018-01-16 14:11:58 -06:00
Ben Ramsey fc6ebc6e72 Remove satooshi/php-coveralls from dev requirements 2018-01-16 13:53:41 -06:00
Ben Ramsey 5a98ff58fe Remove apigen/apigen as a dev dependency 2018-01-16 13:53:41 -06:00
Ben Ramsey c8720ffe16 Upgrade mockery/mockery to the 1.x series 2018-01-16 13:53:32 -06:00
Ben Ramsey bba83ad77b Add CHANGELOG notes for version 3.7.2 3.7.2 2018-01-13 16:22:03 -06:00
Ben Ramsey 21d679130b Merge pull request #196 from carusogabriel/refactoring-tests
Use assertSame
2017-12-10 09:04:55 -08:00
Gabriel Caruso f65471fb5c Use assertSame 2017-12-10 05:51:10 -02:00
Ben Ramsey 21063bd716 Merge pull request #185 from mjrider/add-sysfs-option
Add feature to use sysfs interface to get node identifier
2017-12-01 09:02:13 -08:00
Robbert Müller 8a540b78a1 mock glob function to get assertions work 2017-11-17 16:16:29 +01:00
Robbert Müller 70346f5da3 Fix whitespace 2017-11-17 15:00:23 +01:00
Robbert Müller a9154c4c27 add testcase for getsysfs 2017-11-17 14:52:51 +01:00
Ben Ramsey ab757fc82c Tell Travis to wait on the build, since it can be longer than 10 minutes 2017-11-10 16:38:08 -06:00
Ben Ramsey 6b0445588c Merge branch 'master' into add-sysfs-option 2017-11-10 16:04:30 -06:00
Ben Ramsey ca4154648d Add PHP 7.2 to the Travis build matrix 2017-11-08 21:25:25 -06:00
Ben Ramsey bd7f7f3135 Restrict codeception/aspect-mock to the 2.0.* series
A backward-incompatible change was introduced in codeception/aspect-mock
version 2.1, causing tests to generate errors. There is no need to
update the tests in the 3.x series of ramsey/uuid, so this change
restricts aspect-mock to <2.1.
2017-11-08 21:16:02 -06:00
Ben Ramsey d4a3b6f42e Merge branch 'potherca-contrib-fix/replace-deprecated-getMock' 2017-11-08 12:08:03 -06:00
Robbert Müller 3572bf8755 adapt testcases to also mock getsysfs, to get the old code path tested 2017-10-18 11:33:26 +02:00
Robbert Müller 10e022c05c bug fixes
- add missing default value
- invert logic, because it was doing it the wrong way around
2017-10-18 10:32:45 +02:00
Ben Peachey 58658b8f4d Merge branch 'master' into fix/replace-deprecated-getMock 2017-10-18 08:57:31 +02:00
Ben Peachey c52af4ea07 Removes <5.4 limit for PHPUnit in composer.json file. 2017-10-17 12:47:21 +02:00
Ben Peachey dbb9a8b6d1 Changes all usage in Tests of getMock with getMockBuilder. 2017-10-17 12:46:25 +02:00
Ben Ramsey bb9c49a32f Merge branch 'master' into add-sysfs-option 2017-10-09 09:19:48 -05:00
Robbert Müller cfafc97fc0 Add sysfs option for linux system
Linux offers a sysfs interface to the macaddresses of the system network
interfaces without calling exec.

This enables stable system based UUID generation even on docker images
like php:7
2017-10-06 19:57:30 +02:00
Ben Ramsey 45cffe8220 Add change log notes for 3.7.1 release 3.7.1 2017-09-22 15:46:04 -05:00
Ben Ramsey 749b30e3f9 Add random node test that asserts multicast bit against random values 2017-09-22 15:46:04 -05:00
Ben Ramsey 3f2b434845 Merge pull request #182 from ramsey/node-multicast-bit
Set the multicast bit for random nodes, according to RFC 4122, §4.5
2017-09-22 15:30:45 -05:00
Ben Ramsey dced71b87a Use str_pad() and dechex() instead of sprint()
This is a micro-optimization that improves memory usage when generating
large quantities of UUIDs. See #159 and #160.
2017-09-22 14:27:30 -05:00
Ben Ramsey 5c38d41ccb Use sprintf() to prefix zeros on the returned node hex string 2017-09-22 13:03:41 -05:00
Ben Ramsey 1ec0826a40 Set the multicast bit for random nodes, according to RFC 4122, §4.5
Borrows the idea from cf1c981414 to
properly set the multicast bit to the "least significant bit of the
first octet of the node ID."

When merged, this will close #171 and #170
2017-09-22 12:54:15 -05:00
Ben Ramsey aab08bb08a Use random_bytes() to generate a random node 2017-09-22 12:26:34 -05:00
Ben Ramsey 0ef23d1b10 Add change log notes for 3.7.0 release 3.7.0 2017-08-04 09:39:04 -04:00
Ben Ramsey c141cdc8da Merge pull request #177 from davispeixoto/173-expose-versions-alternative1
issue #173 expose versions alternative1
2017-08-04 09:32:09 -04:00