Giter Site home page Giter Site logo

appoptics-php-testapp-laravel's Introduction

appoptics-php-testapp-laravel

Test Apps for Laravel

Steps to add a new version for Nosetests (example for Laravel 8)

  1. Find out the earliest supported PHP version for Laravel 8: 7.3.0
  2. docker run -it php:7.3 bash
  3. Then inside docker:
    • curl -sS https://getcomposer.org/installer | php
    • mv composer.phar /usr/local/bin/composer
    • apt update && apt install git zip unzip
    • composer create-project --prefer-dist laravel/laravel 8
    • <log out of docker>
  4. docker cp \<docker-id\>:/8 .
  5. We need to edit this folder in order to fit in nosetest, here is the list of files. Can refer to the 8 folder in master branch
    1. Added app/Http/Controllers/TestControllers.php (There are 2 functions for nosetest, nosetest() & nosetestError(). They are testing event + listeners, database, cache & exceptions
    2. Added app/Listeners/NosetestQueuedListener.php
    3. Added app/Listeners/NosetestSyncedListener.php
    4. Updated app/Providers/EventServiceProvider.php to listen NoseEvent
    5. Added app/Models/Nosetest.php for database object
    6. Added app/Events/NoseEvent.php for event object
    7. Updated bootstrap/cache into symbolic link because Jenkins doesn't have admin right in nosetest runtime
    8. Added database/migrations/2020_10_21_212030_create_nosetest_table.php to create the database and table in sqlite
    9. Updated routes/web.php for /nosetest & /nosetesterror routing
    10. Updated storage/framework/views into symbolic link because Jenkins doesn't have admin right in nosetest runtime
    11. Added terminate function to vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php for nosetest [This path can be different from newer laravel version]
    12. Updated .env for Jenkins environment
  6. Create database and table file by touch 8/database/database.sqlite
  7. Create database and table from the migrations files by cd 8 && php artisan migrate
  8. Make sure all files are committed by editing .gitignore files in all folder

Tips: Use php artisan serve to test the laravel app step by step first and customize the environment setting for Jenkins

Reference: commit from the laravel 6 update

appoptics-php-testapp-laravel's People

Contributors

jerrytfleung avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

classicvalues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.