Skip to content

Commit

Permalink
Merge branch 'php-8'
Browse files Browse the repository at this point in the history
  • Loading branch information
gnugat committed Aug 13, 2024
2 parents 9fcf48d + a084886 commit ca3575f
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 44 deletions.
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# CHANGELOG

## 3.0.1: PHP 8 and phpspec 7 support

* added PHP 8 support
* added phpspec 7 support

## 3.0.0: PHP 7.2 requirement

Dropped support for PHP <7.2
Expand Down
64 changes: 45 additions & 19 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,45 +19,71 @@ Here's some tips to make you the best contributor ever:
## Standard code

Use [PHP CS fixer](http://cs.sensiolabs.org/) to make your code compliant with
Memio Model's coding standards:
Memio's coding standards:

./vendor/bin/php-cs-fixer fix --config=sf23 .
```console
$ ./vendor/bin/php-cs-fixer fix .
```

## Specifications

Memio Model drives its development using [phpspec](http://www.phpspec.net/):
Memio drives its development using [phpspec](http://www.phpspec.net/).

# Generate the specification class:
phpspec describe 'Memio\Model\MyNewClass'
First bootstrap the code for the Specification:

# Customize the specification class:
$EDITOR tests/spec/Memio/Model/MyNewClass.php
```console
$ phpspec describe 'Memio\Memio\MyNewUseCase'
```

# Generate the specified class:
phpspec run
Next, write the actual code of the Specification:

# Customize the class:
$EDITOR src/Memio/Model/MyNewClass.php
```console
$ $EDITOR spec/Memio/SpecGen/MyNewUseCase.php
```

phpspec run # Should be green!
Then bootstrap the code for the corresponding Use Case:

```console
$ phpspec run
```

Follow that by writing the actual code of the Use Case:

```console
$ $EDITOR src/Memio/SpecGen/MyNewUseCase.php
```

Finally run the specification:

```console
$ phpspec run
```

Results should be green!

## Keeping your fork up-to-date

To keep your fork up-to-date, you should track the upstream (original) one
using the following command:

git remote add upstream https://github.com/memio/model.git
```console
$ git remote add upstream https://github.com/memio/model.git
```

Then get the upstream changes:

git checkout master
git pull --rebase origin master
git pull --rebase upstream master
git checkout <your-branch>
git rebase master
```console
git checkout main
git pull --rebase origin main
git pull --rebase upstream main
git checkout <your-branch>
git rebase main
```

Finally, publish your changes:

git push -f origin <your-branch>
```console
$ git push -f origin <your-branch>
```

Your pull request will be automatically updated.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Memio's Models [![Travis CI](https://travis-ci.org/memio/model.png)](https://travis-ci.org/memio/model) [![SensioLabsInsight](https://insight.sensiolabs.com/projects/79504ca3-5a36-44b5-93ef-eedd23a34c08/mini.png)](https://insight.sensiolabs.com/projects/79504ca3-5a36-44b5-93ef-eedd23a34c08)
# Memio's Models

Describe PHP code (classes/interfaces with their constants, properties, methods,
method arguments and even PHPdoc) by constructing "Model" objects.
Expand Down
4 changes: 2 additions & 2 deletions VERSIONING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ API of this project.
The branching is inspired by [@jbenet](https://github.com/jbenet)
[simple git branching model](https://gist.github.com/jbenet/ee6c9ac48068889b0912):

> 1. `master` must always be deployable.
> 1. `main` must always be deployable.
> 2. **all changes** are made through feature branches (pull-request + merge)
> 3. rebase to avoid/resolve conflicts; merge in to `master`
> 3. rebase to avoid/resolve conflicts; merge in to `main`
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
"Memio\\Model\\": "src/Memio/Model"
}},
"require": {
"php": "^7.2"
"php": "^7.2 || ^8.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.16",
"phpspec/phpspec": "^6.1"
"phpspec/phpspec": "^6.1 || ^7.0"
}
}

0 comments on commit ca3575f

Please sign in to comment.