PHPackages                             wujunze/declare-strict-easy - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. wujunze/declare-strict-easy

ActiveLibrary

wujunze/declare-strict-easy
===========================

PHP7 tool for easy add/remove "declare(strict\_types=1)"

1.0.3(7y ago)32.9k↓50%1MITPHP

Since Sep 13Pushed 7y ago1 watchersCompare

[ Source](https://github.com/wujunze/declare-strict-easy)[ Packagist](https://packagist.org/packages/wujunze/declare-strict-easy)[ RSS](/packages/wujunze-declare-strict-easy/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (3)Versions (5)Used By (0)

PHP7 tool for easy add/remove "declare(strict\_types=1)"
========================================================

[](#php7-tool-for-easy-addremove-declarestrict_types1)

[![Build Status](https://camo.githubusercontent.com/0521971fcef707f9badf33ecf3896ccba8ab37a713c8d78e881d66718eea9597/68747470733a2f2f7472617669732d63692e6f72672f77756a756e7a652f6465636c6172652d7374726963742d656173792e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/wujunze/declare-strict-easy)[![Latest Stable Version](https://camo.githubusercontent.com/b5af9208d0593e531bd7fe579ed0062ca41b2b9e39e7085b3e72528e406c3460/68747470733a2f2f706f7365722e707567782e6f72672f77756a756e7a652f6465636c6172652d7374726963742d656173792f762f737461626c652e706e67)](//packagist.org/packages/wujunze/declare-strict-easy)[![Latest Unstable Version](https://camo.githubusercontent.com/e23a6bff9318e157d2eb467c9cb256c8085c7af717636c9ff938d4e18a37f3d4/68747470733a2f2f706f7365722e707567782e6f72672f77756a756e7a652f6465636c6172652d7374726963742d656173792f762f756e737461626c652e706e67)](//packagist.org/packages/wujunze/declare-strict-easy)[![Total Downloads](https://camo.githubusercontent.com/9f54a0d271ef61d9e672257e858dbbe173dc7a657c2342bb3b0a78bf727d4420/68747470733a2f2f706f7365722e707567782e6f72672f77756a756e7a652f6465636c6172652d7374726963742d656173792f646f776e6c6f6164732e706e67)](//packagist.org/packages/wujunze/declare-strict-easy)

Enable strict typing in your project with one command. Based on PCRE and supports PSR-2.

WARNING: before run command ensure that you have backup of your files!!!

Base on [declare-strict-types](https://github.com/dypa/declare-strict-types)
----------------------------------------------------------------------------

[](#base-on-declare-strict-types)

Thanks to [declare-strict-types](https://github.com/dypa/declare-strict-types)
------------------------------------------------------------------------------

[](#thanks-to-declare-strict-types)

Usage
-----

[](#usage)

Install via composer

`composer require --dev wujunze/declare-strict-easy`

Run command to add "declare(strict\_types=1)" in all files in specified folders

`bin/declare_strict_types add --exclude=bar/baz/bah foo/directory bar/baz`

Also supports remove mode

`bin/declare_strict_types remove foo/directory`

PS
--

[](#ps)

You may prefer [PHP-CS-Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) with "declare\_strict\_types" rule!

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

2796d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0bf502ba4ce9952fcb8a819f9aca3fa616e237ad8d59a47b9071710e95422c1d?d=identicon)[wujunze](/maintainers/wujunze)

---

Top Contributors

[![wujunze](https://avatars.githubusercontent.com/u/12997869?v=4)](https://github.com/wujunze "wujunze (9 commits)")

---

Tags

php7strict-type

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/wujunze-declare-strict-easy/health.svg)

```
[![Health](https://phpackages.com/badges/wujunze-declare-strict-easy/health.svg)](https://phpackages.com/packages/wujunze-declare-strict-easy)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.6k509.9M17.0k](/packages/laravel-framework)[spatie/laravel-backup

A Laravel package to backup your application

6.0k21.8M190](/packages/spatie-laravel-backup)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19462.3M1.3k](/packages/drupal-core)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
