Commit Graph

26 Commits

Author SHA1 Message Date
Ben Ramsey c005f69d6e chore: update package files 2021-08-06 14:05:57 -05:00
Ben Ramsey 2f3a93c438 chore: remove file from gitattributes 2020-10-31 14:49:08 -05:00
Ben Ramsey 65f39c93f4 Rename codecov yaml file and add to gitattributes 2020-10-28 22:51:20 -05:00
Ben Ramsey b5dadc7eb4 Remove Travis CI config and update readme 2020-10-28 22:43:57 -05:00
Ben Ramsey 9409ea98ba Revert "Commit lockfile for Composer"
This reverts commit e3771b067a.
2020-10-28 21:45:07 -05:00
Ben Ramsey e3771b067a Commit lockfile for Composer 2020-10-28 21:22:35 -05:00
Ben Ramsey eb355012a5 Add security policy 2020-10-28 21:21:21 -05:00
Marco Pivetta 8d42044a99 Minimal benchmarks around Uuid::fromString(), Uuid::fromBytes(), Uuid#toString(), Uuid#getBytes()
This is mostly to store an initial state, before we go on and start manipulating the UUID library internals.
2020-07-09 13:56:04 +02:00
Ben Ramsey cbd6a45a6a [ci skip] Update documentation 2020-03-01 23:59:58 -06:00
Ben Ramsey 5d7c0f2210 Move files to clean up project root directory 2020-01-19 23:48:55 -06:00
Ben Ramsey 5face57baa Add psalm.xml to the export-ignores 2020-01-18 12:14:00 -06:00
Barney Laurance bdc9170edc Run Psalm on src as well as Static Analysis Fixture (#282)
* Run Psalm on src as well as Static Analysis Fixture

Psalm baselining feature is used to prevent immediate build failures -
psalm will just cause failures for errors caused by future changes to
the code.

See https://psalm.dev/docs/running_psalm/dealing_with_code_issues/#using-a-baseline-file

* Fix MixedArgument issues in OrderedTimeCodec

Potentially unpack should be documented as returning string[] instead of
array to make this unecassary.

* Fix Psalm PossiblyNullPropertyAssignmentValue issues

* Add psalm-immutable annotation to Uuid class

* Fix Psalm MixedArgument issues

* Fix MissingImmutableAnnotation psalm issue

* Fix Psalm MixedAssignment issue

* Fix Psalm InvalidReturnStatement / InvalidReturnType issue

* Add ImpureMethodCall issues to baseline.

Fixing these in one place just moves them somewhere else.

* Exclude psalm-baseline.xml from exported git archives
2020-01-18 12:13:56 -06:00
Marco Pivetta c935fbb0d9 Added minimal static analysis test suite to ensure purity/immutability of UUID API
This covers most of the commonly used `Uuid` and `UuidInterface` API, and allows us
to pass around `UuidInterface` references as if they were pure.

Note that this only verifies the *contract* of a `UuidInterface`: it is still very
much possible to write mutable `UuidInterface` implementations (and `Uuid` itself
has such an edge-case, allowing for replacement of the static `UuidFactory` reference),
but if you really do mutate UUIDs at runtime, then your code is very much hurting your
project, and you should get rid of that detail.
2020-01-18 12:13:55 -06:00
Ben Ramsey 0d7b8c2b7a Update coding style to include PSR-12, among other options
This also includes heavy use of slevomat/coding-standard to apply
various checks to the code, based on maintainer (me) preference.
2020-01-18 12:13:55 -06:00
Ben Ramsey 39c610ea31 Clean up project documentation and repo metadata 2019-11-30 11:07:39 -08:00
Ben Ramsey 79e56bc162 Exclude docs, tests, tools from GitHub language statistics 2018-03-23 11:03:46 -04: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 446df35e87 Move util/ to tools/
GitHub ignores the contents of the tools/ directory for the purpose of
repo language statistics.
2017-03-26 16:03:42 -05:00
Ben Ramsey fa38bdddc5 Remove Gitter and Scrutinizer integration 2017-03-18 10:11:07 -05:00
Ben Ramsey 6d712900f4 Modify Travis CI builds to run tests on multiple CPU architectures
The ramsey/uuid library has requirements to run on 32-bit and 64-bit
systems, as well as little-endian and big-endian systems. Travis CI only
provides hardware for testing 64-bit, little-endian CPU architectures,
but they recently announced support for Docker[^1].

After some research, I found it is possible to use [QEMU][] with
[chroot][] jails on Travis CI to emulate other CPU architectures and run
tests through these chroot jails[^2]. Unfortunately, it takes an awful
long time to set up a chroot jail, build PHP within it, and run the
tests. It wasn't reasonable to expect to do this on every single push to
the ramsey/uuid repository. This is where Docker comes in.

I was able to create chroot jails for each architecture and version of
PHP combination I need to test and then turn these into Docker images,
which Travis is able to download and run fairly quickly. The instances
on which Travis CI is running their Docker services do not currently
support phpenv or php-build, so I needed to masquerade as a Python
project and specify all PHP versions and CPU architectures in
environment variables in my `.travis.yml` configuration. I run
`composer install` and report to Coveralls outside of the Docker images,
but all tests are run within the Docker images.

The Docker image I created for PHP 7.0.0RC4 on MIPS architecture
produces segfaults when attempting to build PHP with Phar. PHP builds
okay without Phar, but then it produces segfaults when running any PHP
script on the image, so I'm leaving out 7.0.0RC4 on MIPS for now.

The Docker images for use with ramsey/uuid tests are available here:
<https://hub.docker.com/r/benramsey/ramsey-uuid/>.

[^1]: "Using Docker on Travis
CI," <http://blog.travis-ci.com/2015-08-19-using-docker-on-travis-ci/>
[^2]: "Running Travis CI tests on ARM architecture,"
<https://www.tomaz.me/2013/12/02/running-travis-ci-tests-on-arm.html>

[qemu]: http://wiki.qemu.org/Main_Page
[chroot]: https://en.wikipedia.org/wiki/Chroot
2015-10-07 22:59:11 -05:00
Ben Ramsey 95d84d3b08 Add Scrutinizer build configuration 2015-08-13 10:12:32 -05:00
Ben Ramsey 2d2c57d233 Remove apigen.neon config 2015-06-21 19:53:09 -05:00
Ben Ramsey 39c98bb652 Add phpcs.xml to the .gitattributes ignore list 2014-11-08 16:50:04 -05:00
Greg Roach 6485884397 Exclude build/development tools from releases using .gitattributes 2014-10-24 14:31:22 +01:00