GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - CodeIgniter/phpstan-codeigniter: CodeIgniter extensions and rules for PHPStan

BranchesTags
Open more actions menu

Latest commit

 

History

206 Commits
206 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
docs
docs
 
 
src
src
 
 
tests
tests
 
 
tmp
tmp
 
 
.editorconfig
.editorconfig
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.php-cs-fixer.dist.php
.php-cs-fixer.dist.php
 
 
CHANGELOG.md
CHANGELOG.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
bootstrap.php
bootstrap.php
 
 
composer.json
composer.json
 
 
extension.neon
extension.neon
 
 
phpstan.dist.neon
phpstan.dist.neon
 
 
phpunit.dist.xml
phpunit.dist.xml
 
 

Repository files navigation

PHPStan CodeIgniter4 extension

Extension Tests Coding Standards Check PHPStan Static Analysis

  • PHPStan
  • CodeIgniter4

Description

This PHPStan extension provides type inference support and rules for CodeIgniter4.

  • Rules
  • Type inference
  • Upgrading from 1.x to 2.x

Installation

To use this extension, require it in Composer:

composer require --dev codeigniter/phpstan-codeigniter

If you also install phpstan/extension-installer then you're all set!

Manual installation

If you don't want to use phpstan/extension-installer, include extension.neon in your project's PHPStan config:

includes:
    - vendor/codeigniter/phpstan-codeigniter/extension.neon

Bootstrapping CodeIgniter

This extension boots CodeIgniter during analysis so it can read your configuration, services, and database schema. Point PHPStan at a bootstrap file that loads the framework. CodeIgniter's own test bootstrap works out of the box:

parameters:
    bootstrapFiles:
        - vendor/codeigniter4/framework/system/Test/bootstrap.php

The Model and Entity type inference additionally materializes your schema by running your migrations against a temporary SQLite database, so the sqlite3 PHP extension is required (it is declared in this package's composer.json). The schema is cached under the working directory's tmp folder by default. See the type inference docs for how to point it at a specific namespace.

Contributing

Any contributions are welcome.

If you want to see a new rule or extension specific to CodeIgniter, please open a feature request. If you can contribute the code yourself, please open a pull request instead.

Before reporting any bugs, please check if the bug occurs only if using this extension with PHPStan. If the bug is reproducible in PHPStan alone, please open a bug report there instead. Thank you!

License

PHPStan CodeIgniter is an open source library licensed under MIT.

About

CodeIgniter extensions and rules for PHPStan

codeigniter.com/

Topics

codeignitercodeigniter4phpphpstan-extensionstatic-analysis

Resources

Readme
MIT license
Activity
Custom properties

Stars

22 stars

Watchers

7 watching

Forks

2 forks
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.