Coder Social home page Coder Social logo

laracon-2024-rector-demo's Introduction

Laracon 2024 Amsterdam Rector demo

A small introduction to Rector 0.19.7 - released during Laracon :)

It requires PHP 7.2 as the lowest version to run. 8.0 and 8.1 to test all the features demoed on the stage.

Usage

Fork this repository, clone locally and then install dependencies:

composer update

List of examples

  1. Upgrade PHP

    • based on composer.json
    • go one version at a time
    • control version in the withPhpSets()
    • promoted properties
    • readonly classes
  2. Type coverage

    • Add return types
    • Add property types based on constructor
    • Show withTypeCoverageLevel() (coming soon)
  3. Dead code removal

    • Remove unused properties
    • Show withDeadCodeLevel() (coming soon)
  4. Create a custom Rector rule

    • Create a rule
    • Hook into a FuncCall node
    • Rename the function
  5. Make use of Laravel extension package

composer require driftingly/rector-laravel --dev
  1. Bonus: Laravel types
    • Clone laravel framework and run type coverage level there :)

Resources

People around Rector & Laravel to follow

laracon-2024-rector-demo's People

Contributors

tomasvotruba avatar

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.