You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Franck Paul 057d51a910
Composer update (phpstan) + false positives
1 week ago
bin Update phpstan and atoum 4 months ago
common safe_mode (PHP.ini) is deprecated since PHP 5.3 and removed in PHP 5.4 2 months ago
dblayer Large code review, version 1.4 3 months ago
dbschema Oups, my bad, the very bad typo :-p 3 months ago
diff Composer update (phpstan) + false positives 1 week ago
filemanager Some arguments types were missing 2 months ago
html.filter PHPStan with PHP 7.4 (automatic Jenkins task) seems to be sensible to unknown types (XMLParser, GdImage) 3 months ago
html.form Add autocapitalize and autocorrect attributes in common rendered attributes 2 months ago
html.validator Large code review, version 1.4 3 months ago
image PHPStan with PHP 7.4 (automatic Jenkins task) seems to be sensible to unknown types (XMLParser, GdImage) 3 months ago
mail Large code review, version 1.4 3 months ago
net Large code review, version 1.4 3 months ago
net.http Initialize variables passed by reference before calling (bis) 1 week ago
net.http.feed Initialize variables passed by reference before calling 3 months ago
net.xmlrpc Initialize variable before passing them as references 2 months ago
pager Large code review, version 1.4 3 months ago
rest Large code review, version 1.4 3 months ago
session.db Large code review, version 1.4 3 months ago
template Composer update (phpstan) + false positives 1 week ago
tests/unit Large code review, version 1.4 3 months ago
text.wiki2xhtml Large code review, version 1.4 3 months ago
url.handler Large code review, version 1.4 3 months ago
zip PHP code review (sonarlint, see https://rules.sonarsource.com/) 3 months ago
.atoum.coverage.php Rename atoum namespace from mageekguy to atoum 2 years ago
.atoum.php Rename atoum namespace from mageekguy to atoum 2 years ago
.doxygen.conf Large code review, version 1.4 3 months ago
.editorconfig Config for Makefile editor 3 years ago
.gitignore Track .gitignore 3 years ago
.php-cs-fixer.dist.php PHP 8.1 compliance (WIP) 12 months ago
LICENSE Simplify licence block at the beginning of each file, add licence information in README, add license file (text format) 5 years ago
Makefile Remove old debian folder, update Makefile accordingly, update doxygen version 3 months ago
README.md Clearbricks is now a singleton, new Clearbricks and Autoload class 3 months ago
_common.php Add formButton and formSubmit (extends formInput) 2 months ago
composer.json Composer update (phpstan) + false positives 1 week ago
composer.lock Composer update (phpstan) + false positives 1 week ago
phpstan.bootstrap Large code review, version 1.4 3 months ago
phpstan.neon Large code review, version 1.4 3 months ago

README.md

Clearbricks

What is this

No, Clearbricks is not yet another framework. Clearbricks is not cool at all and does not even have a nice website. It won't make you smart neither have great ideas for you.

Clearbricks is only about code and efficiency, consider it as a toolbox. And please, do me a favor, don't call it a framework :-)

How do I use it

Clearbricks is about "using what we need when we need it". Pick the module(s) you need and add it to your code. The only thing you'll always need is the "common" directory.

Once you're ready, you have to create a _common.php file on top of your Clearbricks path (or wherever you want) and add $__autoload entries for your modules.

Take a look at the _common.php file.

Of course, you're encouraged to use the $__autoload magic for your own classes.

Requirements

In order to use Clearbricks you need:

  • PHP 7.4 with the following modules:
    • mbstring
    • iconv
    • simplexml
    • json

API documentation

A doxygen configuration file is provided to generate the Clearbricks API documentation which will be readable in doxygen folder:

doxygen .doxygen.conf

Tests

Clearbricks classes are tested using atoum (see doc). To run tests,

Clone this repository:

git clone https://git.dotclear.org/dev/clearbricks.git

Download the composer.phar executable or use the installer.

curl -sS https://getcomposer.org/installer | php

You may also install composer with:

apt install composer

Update dependencies via composer:

composer.phar install

And now can run tests:

./bin/atoum

Add -ebpc option to enable path and branch coverage (this option requires xDebug 2.3+)

You can also get code coverage report (in coverage/html) for tests by runing:

./bin/atoum -c .atoum.coverage.php

For PHP static analysis, run:

bin/phpstan analyse --memory-limit=-1

License

Copyright Olivier Meunier & Association Dotclear

GPL-2.0-only

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.