Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rollerworks/split-token
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.1.0
Choose a base ref
...
head repository: rollerworks/split-token
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on Feb 9, 2019

  1. Copy the full SHA
    6a1665b View commit details
  2. Copy the full SHA
    9a00c25 View commit details

Commits on Mar 10, 2019

  1. Copy the full SHA
    ca5f4d4 View commit details

Commits on Mar 12, 2019

  1. Copy the full SHA
    8566f85 View commit details

Commits on Mar 22, 2019

  1. bug #1 Update docs to match implementation (iangregory)

    This PR was squashed before being merged into the 1.0-dev branch.
    
    Discussion
    ----------
    
    Corrects a couple of inconsistencies between the docs/comments and the code
    
    Commits
    -------
    
    ca5f4d4 Update README.md to match implementation
    8566f85 Correct usage example in comments
    sstok authored Mar 22, 2019
    Copy the full SHA
    cef8f21 View commit details

Commits on Feb 1, 2021

  1. Allow PHP 8

    sstok committed Feb 1, 2021
    Copy the full SHA
    83fc178 View commit details
  2. minor #2 Allow PHP 8 (sstok)

    This PR was merged into the 1.0-dev branch.
    
    Discussion
    ----------
    
    
    
    Commits
    -------
    
    83fc178 Allow PHP 8
    sstok authored Feb 1, 2021
    Copy the full SHA
    b5975c9 View commit details

Commits on May 26, 2021

  1. Update branch alias

    sstok committed May 26, 2021
    Copy the full SHA
    2f96a10 View commit details
  2. Copy the full SHA
    304f4a3 View commit details
  3. Allow v2.0 of hidden string

    sstok committed May 26, 2021
    Copy the full SHA
    2c307d3 View commit details
  4. feature #3 Allow v2.0 of hidden string (sstok)

    This PR was merged into the main branch.
    
    Discussion
    ----------
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | no
    | New feature?  | yes
    | BC breaks?    | no
    | Deprecations? | no
    | Fixed tickets | 
    | License       | MPLv2.0
    
    
    
    
    Commits
    -------
    
    2c307d3 Allow v2.0 of hidden string
    sstok authored May 26, 2021
    Copy the full SHA
    cc4e6c3 View commit details
  5. Fix github workflow

    Could you kindly work, please?
    sstok authored May 26, 2021
    Copy the full SHA
    0d25397 View commit details

Commits on Nov 5, 2023

  1. Clean-up old files

    sstok committed Nov 5, 2023
    Copy the full SHA
    b3d85d3 View commit details
  2. Modernize readme

    sstok committed Nov 5, 2023
    Copy the full SHA
    92ba66a View commit details
  3. Drop support for PHP 7/8.1

    sstok committed Nov 5, 2023
    Copy the full SHA
    42824fc View commit details

Commits on Nov 6, 2023

  1. Correct CS

    sstok committed Nov 6, 2023
    Copy the full SHA
    2f9e1af View commit details
  2. Allow easier expiration handling

    Allow a DateInterval or exact DateTime point
    And allow to specify a Clock instance for easier testing
    sstok committed Nov 6, 2023
    Copy the full SHA
    830a1f9 View commit details
  3. Copy the full SHA
    79f0ea9 View commit details
  4. Fix PHPStan errors

    sstok committed Nov 6, 2023
    Copy the full SHA
    8015b98 View commit details
  5. Update GitHub workflows

    sstok committed Nov 6, 2023
    Copy the full SHA
    a8a131a View commit details
  6. Update README.md

    sstok committed Nov 6, 2023
    Copy the full SHA
    4281795 View commit details
  7. feature #4 Move to PHP 8.2 (sstok)

    This PR was merged into the 1.0-dev branch.
    labels: bc-break
    
    Discussion
    ----------
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | yes
    | New feature?  | yes
    | BC breaks?    | yes
    | Deprecations? | no
    | Fixed tickets | 
    | License       | MIT
    
    Dropped support for PHP 8.1 (8.2 is minimum now), modernized the code base and hardened against cases of misuse.
    Secondly, it's now easier to set an expiration for a token.
    
    Commits
    -------
    
    b3d85d3 Clean-up old files
    92ba66a Modernize readme
    42824fc Drop support for PHP 7/8.1
    2f9e1af Correct CS
    830a1f9 Allow easier expiration handling
    79f0ea9 Add upgrade instructions - replaces changelog
    8015b98 Fix PHPStan errors
    a8a131a Update GitHub workflows
    4281795 Update README.md
    sstok authored Nov 6, 2023
    Copy the full SHA
    82b76ae View commit details

Commits on Jan 6, 2024

  1. Copy the full SHA
    661ba98 View commit details
  2. Copy the full SHA
    c700405 View commit details
  3. feature #5 Allow Stringable and HiddenString as token input (sstok)

    This PR was merged into the 1.0-dev branch.
    
    Discussion
    ----------
    
    | Q             | A
    | ------------- | ---
    | Bug fix?      | no
    | New feature?  | yes
    | BC breaks?    | yes
    | Deprecations? | yes/no
    | Fixed tickets | 
    | License       | MIT
    
    While considering a BC break this only effects custom factory implementations.
    
    Commits
    -------
    
    661ba98 Allow Stringable and HiddenString as token input
    c700405 Add #[\SensitiveParameter] to token and verifier
    sstok authored Jan 6, 2024
    Copy the full SHA
    bdbe7f1 View commit details
11 changes: 5 additions & 6 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -4,12 +4,11 @@ core.autocrlf=lf
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.travis.yml export-ignore
CODE_OF_CONDUCT.md export-ignore
.github export-ignore
.php-cs-fixer.dist.php export-ignore
CODE_OF_CONDUCT.md export-ignore
Makefile export-ignore
phpunit.xml.dist export-ignore
infection.json.dist export-ignore
phpcs.xml.dist export-ignore
phpstan.neon export-ignore
psalm.xml export-ignore
psalm-baseline.xml export-ignore
phpstan-baseline.neon export-ignore
tests/ export-ignore
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
| Q | A
| ---------------- | -----
| Bug report? | yes/no
| Feature request? | yes/no
| BC Break report? | yes/no
| RFC? | yes/no

<!--
- Make sure to always try the latest version before opening an issue.
- Please fill in this template according to your issue.
- Replace this comment by the description of your issue.
-->
14 changes: 14 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
| Q | A
| ------------- | ---
| Bug fix? | yes/no
| New feature? | yes/no
| BC breaks? | yes/no
| Deprecations? | yes/no
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License | MIT

<!--
- Please fill in this template according to the PR you're about to submit.
Provide additional information in your description, not the questioner table.
- Replace this comment by a description of what your PR is solving.
-->
157 changes: 157 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
name: 'CI'

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
cs-fixer:
name: 'PHP CS Fixer'

runs-on: 'ubuntu-latest'

strategy:
matrix:
php-version:
- '8.2'

steps:
-
name: 'Check out'
uses: 'actions/checkout@v4'

-
name: 'Set up PHP'
uses: 'shivammathur/setup-php@v2'
with:
php-version: '${{ matrix.php-version }}'
coverage: 'none'

-
name: 'Get Composer cache directory'
id: 'composer-cache'
run: 'echo "cache_dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT'

-
name: 'Cache dependencies'
uses: 'actions/cache@v3'
with:
path: '${{ steps.composer-cache.outputs.cache_dir }}'
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
restore-keys: 'php-${{ matrix.php-version }}-composer-locked-'

-
name: 'Install dependencies'
run: 'composer install --no-progress'

-
name: 'Check the code style'
run: 'make cs'

phpstan:
name: 'PhpStan'

runs-on: 'ubuntu-latest'

strategy:
matrix:
php-version:
- '8.2'

steps:
-
name: 'Check out'
uses: 'actions/checkout@v4'

-
name: 'Set up PHP'
uses: 'shivammathur/setup-php@v2'
with:
php-version: '${{ matrix.php-version }}'
coverage: 'none'

-
name: 'Get Composer cache directory'
id: 'composer-cache'
run: 'echo "cache_dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT'

-
name: 'Cache dependencies'
uses: 'actions/cache@v3'
with:
path: '${{ steps.composer-cache.outputs.cache_dir }}'
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
restore-keys: 'php-${{ matrix.php-version }}-composer-locked-'

-
name: 'Install dependencies'
run: 'composer install --no-progress'

-
name: 'Run PhpStan'
run: 'vendor/bin/phpstan analyze --no-progress'

tests:
name: 'PHPUnit'

runs-on: 'ubuntu-latest'

strategy:
matrix:
include:
-
php-version: '8.2'
composer-options: '--prefer-stable'
symfony-version: '6.3'
-
php-version: '8.2'
composer-options: '--prefer-stable'
symfony-version: '^6.4'

-
php-version: '8.2'
composer-options: '--prefer-stable'
symfony-version: '^7.0'

steps:
-
name: 'Check out'
uses: 'actions/checkout@v4'

-
name: 'Set up PHP'
uses: 'shivammathur/setup-php@v2'
with:
php-version: '${{ matrix.php-version }}'
coverage: 'none'

-
name: 'Get Composer cache directory'
id: 'composer-cache'
run: 'echo "cache_dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT'

-
name: 'Cache dependencies'
uses: 'actions/cache@v3'
with:
path: '${{ steps.composer-cache.outputs.cache_dir }}'
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
restore-keys: 'php-${{ matrix.php-version }}-composer-locked-'

-
name: 'Install dependencies'
env:
COMPOSER_OPTIONS: '${{ matrix.composer-options }}'
SYMFONY_REQUIRE: '${{ matrix.symfony-version }}'
run: |
composer global config --no-plugins allow-plugins.symfony/flex true
composer global require --no-progress --no-scripts --no-plugins symfony/flex
composer update --no-progress $COMPOSER_OPTIONS
-
name: 'Run tests'
run: make phpunit
11 changes: 8 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
composer.lock
/vendor/
/composer.lock
/phpcs.xml
/var/

phpunit.xml
.phpunit.result.cache
.phpunit.cache/
.phpunit

.php-cs-fixer.cache
27 changes: 27 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

$header = <<<EOF
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
EOF;

/** @var \Symfony\Component\Finder\Finder $finder */
$finder = PhpCsFixer\Finder::create();
$finder
->in([
__DIR__ . '/src',
__DIR__ . '/tests',
]);

$config = new PhpCsFixer\Config();
$config
->setRiskyAllowed(true)
->setRules(
array_merge(
require __DIR__ . '/vendor/rollerscapes/standards/php-cs-fixer-rules.php',
['header_comment' => ['header' => $header]])
)
->setFinder($finder);

return $config;
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

8 changes: 0 additions & 8 deletions CHANGELOG.md

This file was deleted.

55 changes: 2 additions & 53 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,55 +1,4 @@
ifndef BUILD_ENV
BUILD_ENV=php7.2
endif

QA_DOCKER_IMAGE=parkmanager/phpqa:latest
QA_DOCKER_COMMAND=docker run --init --interactive --tty --rm --env "COMPOSER_HOME=/composer" --user "$(shell id -u):$(shell id -g)" --volume /tmp/tmp-phpqa-$(shell id -u):/tmp:delegated --volume "$(shell pwd):/project:delegated" --volume "${HOME}/.composer:/composer:delegated" --workdir /project ${QA_DOCKER_IMAGE}

install: composer-install
dist: composer-validate cs phpstan psalm test
ci: check test
check: composer-validate cs-check phpstan psalm
test: phpunit-coverage

clean:
rm -rf var/

composer-validate: ensure
sh -c "${QA_DOCKER_COMMAND} composer validate"

composer-install: fetch ensure clean
sh -c "${QA_DOCKER_COMMAND} composer upgrade"

composer-install-lowest: fetch ensure clean
sh -c "${QA_DOCKER_COMMAND} composer upgrade --prefer-lowest"

composer-install-dev: fetch ensure clean
rm -f composer.lock
cp composer.json _composer.json
sh -c "${QA_DOCKER_COMMAND} composer config minimum-stability dev"
sh -c "${QA_DOCKER_COMMAND} composer upgrade --no-progress --no-interaction --no-suggest --optimize-autoloader --ansi"
mv _composer.json composer.json

cs:
sh -c "${QA_DOCKER_COMMAND} php vendor/bin/phpcbf"

cs-check:
sh -c "${QA_DOCKER_COMMAND} php vendor/bin/phpcs"

phpstan: ensure
sh -c "${QA_DOCKER_COMMAND} phpstan analyse"

psalm: ensure
sh -c "${QA_DOCKER_COMMAND} psalm --show-info=false"

phpunit-coverage: ensure
sh -c "${QA_DOCKER_COMMAND} phpdbg -qrr vendor/bin/phpunit --verbose --coverage-text --log-junit=var/phpunit.junit.xml --coverage-xml var/coverage-xml/"
include vendor/rollerscapes/standards/Makefile

phpunit:
sh -c "${QA_DOCKER_COMMAND} phpunit --verbose"

ensure:
mkdir -p ${HOME}/.composer /tmp/tmp-phpqa-$(shell id -u)

fetch:
docker pull "${QA_DOCKER_IMAGE}"
./vendor/bin/phpunit
Loading