-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Version 1 PR (Open for ongoing review until finalised) (#10)
* Various improvements to the make:api-resource generator command Get rid of class_basename helper because laravel adds it in 5.8 Add laravel support 5.8 as a dependency * Routes should be kebab case, not snake * Fix missing bracket * Update migrate command with create_table style name * Updating $with behaviour and splitting into item and collection * Put should take request * viewAll policy ability & stub update * First pass at put * Better handling of saving model in service, immediate update to put * Extend json formatter * StyleCI fixes * Minor improvements to str handling * Move before function to laravel base repo for boilerplate, to make it more clear/transparent what is happening * Improvements to validating model update - especially relating to multi/level rule keys (separated by dots) * Remove blank line (cs) * Typehints for array on some service functions * Simplify logic with Str::before * V1 testing approach (#12) * First testing approach * Much improved approach * Removing old location of files * Large amount of progress * Reorganising tests directory Automating config copying & putting overrides in phpunit.xml Renaming routes file for clarity * Commit travis-ci file * Specify matrix * Exclude test dir from styleci * Added php 7.4 to travis * Attempt to remove xdebug * Update test script * Add a testing note * Add restful service test * Add phpunit dist * Remove php 7.4 snap from travis * Add travis shield * Separating out testing setup from base testcase * Make the Policy stub return true from all functions by default (ie. default functionality as if there were no policy) * Implement JSON formatting for meta in responses Refactor the function to format keycase from transformer into apiboilerplate class * Fixed static references * Refactoring to put helpers in a class * Update controllers to use new itemWith and collectionWith Revert them back to public static as well * StyleCI
- Loading branch information
1 parent
503a7f3
commit 3a6c2e8
Showing
94 changed files
with
4,125 additions
and
177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,5 +11,5 @@ disabled: | |
|
||
finder: | ||
exclude: | ||
- "tests" | ||
- "vendor" | ||
- "vendor" | ||
- "test" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
language: php | ||
|
||
matrix: | ||
include: | ||
- php: 7.1 | ||
- php: 7.2 | ||
- php: 7.3 | ||
|
||
sudo: false | ||
|
||
dist: xenial | ||
|
||
env: | ||
global: | ||
- setup=basic | ||
- xdebug=false | ||
|
||
cache: | ||
directories: | ||
- $HOME/.composer/cache | ||
|
||
before_install: | ||
- if [[ $xdebug = 'true' ]] ; then phpenv config-rm xdebug.ini; fi | ||
|
||
install: | ||
- if [[ $setup = 'basic' ]]; then travis_retry composer install --prefer-dist --no-interaction --no-suggest; fi | ||
- if [[ $setup = 'stable' ]]; then travis_retry composer update --prefer-dist --no-interaction --no-suggest --prefer-stable; fi | ||
- if [[ $setup = 'lowest' ]]; then travis_retry composer update --prefer-dist --no-interaction --no-suggest --prefer-stable --prefer-lowest; fi | ||
|
||
script: | ||
- composer test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit backupGlobals="false" | ||
backupStaticAttributes="false" | ||
beStrictAboutTestsThatDoNotTestAnything="true" | ||
beStrictAboutOutputDuringTests="true" | ||
bootstrap="vendor/autoload.php" | ||
colors="true" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
failOnRisky="true" | ||
failOnWarning="true" | ||
processIsolation="false" | ||
stopOnError="false" | ||
stopOnFailure="false" | ||
verbose="true" | ||
> | ||
<testsuites> | ||
<testsuite name="API Test Suite"> | ||
<directory suffix="Test.php">./test/tests</directory> | ||
<exclude>./test/tests/TestCase.php</exclude> | ||
</testsuite> | ||
</testsuites> | ||
<filter> | ||
<whitelist processUncoveredFilesFromWhitelist="true"> | ||
<directory suffix=".php">./src</directory> | ||
</whitelist> | ||
</filter> | ||
<php> | ||
<env name="DB_CONNECTION" value="testing"/> | ||
<env name="APP_ENV" value="testing"/> | ||
<!-- Test App --> | ||
<env name="APP_DEBUG" value="true"/> | ||
<env name="APP_URL" value="http://localhost"/> | ||
<env name="APP_KEY" value="CC58JtJ6QNRTnAr3tdwTw6qMuiK4nDTaozD8Uk3zQ0xuTc6VbW2DBek3cArbnZTx"/> | ||
<env name="API_PREFIX" value="/"/> | ||
<env name="JWT_SECRET" value="WrL8dp51k231ErDyUMgazU9KceL1RKXusu1U39YARuMbUWKuurPEtqGhEDCrUMoB"/> | ||
<env name="JWT_TTL" value="7220"/> | ||
<!-- Test App --> | ||
</php> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.