thbighead / wordless-framework
Wordless Framework.
Requires
- php: ^8.2
- ext-apcu: *
- ext-bcmath: *
- ext-ctype: *
- ext-curl: *
- ext-dom: *
- ext-exif: *
- ext-fileinfo: *
- ext-filter: *
- ext-iconv: *
- ext-intl: *
- ext-json: *
- ext-mbstring: *
- ext-memcached: *
- ext-mysqli: *
- ext-openssl: *
- ext-pcntl: *
- ext-pcre: *
- ext-session: *
- ext-shmop: *
- ext-simplexml: *
- ext-sodium: *
- ext-tokenizer: *
- ext-xml: *
- ext-xmlreader: *
- doctrine/inflector: ^2.0
- fakerphp/faker: ~1.23.0
- fruitcake/php-cors: ^1.3
- lcobucci/jwt: ^5.2
- league/csv: ^9.16
- monolog/monolog: ^3.5
- nesbot/carbon: ^2.72
- paragonie/csp-builder: ^3.0
- ramsey/uuid: ^4.7
- roots/wordpress: ^6
- symfony/console: ^6.3
- symfony/dotenv: ^6.3
- symfony/http-client: ^6.3
- symfony/http-foundation: ^6.3
- symfony/validator: ^6.3
- wp-cli/doctor-command: ^2.1
- wp-cli/profile-command: ^2.1
- wp-cli/wp-cli: ^2.10
- wp-cli/wp-cli-bundle: ^2.10
Requires (Dev)
- matthiasmullie/minify: ^1.3
- phpunit/phpunit: ~10.5.3
- psy/psysh: ^0.11.22
- symfony/var-dumper: ^6.3
- dev-main
- v8.26.11
- v8.26.10
- v8.26.9
- 8.26.8
- v8.26.7
- v8.26.6
- v8.26.5
- v8.26.4
- v8.26.3
- v8.26.2
- v8.26.1
- v8.26.0
- v8.25.4
- v8.25.3
- v8.25.2
- v8.25.1
- v8.25.0
- v8.24.1
- v8.24.0
- v8.23.5
- v8.23.4
- v8.23.3
- v8.23.2
- v8.23.1
- v8.23.0
- v8.22.2
- v8.22.1
- v8.22.0
- v8.21.3
- v8.21.2
- v8.21.1
- v8.21.0
- v8.20.0
- v8.19.1
- v8.19.0
- v8.18.2
- v8.18.1
- v8.18.0
- v8.17.0
- v8.16.1
- v8.16.0
- v8.15.1
- v8.15.0
- v8.14.0
- v8.13.0
- v8.12.11
- v8.12.10
- v8.12.9
- v8.12.8
- v8.12.7
- v8.12.6
- v8.12.5
- v8.12.4
- v8.12.3
- v8.12.2
- v8.12.1
- v8.12.0
- v8.11.2
- v8.11.1
- v8.11.0
- v8.10.8
- v8.10.7
- v8.10.6
- v8.10.5
- v8.10.4
- v8.10.3
- v8.10.2
- v8.10.1
- v8.10.0
- v8.9.0
- v8.8.1
- v8.8.0
- v8.7.1
- v8.7.0
- v8.6.2
- v8.6.1
- v8.6.0
- v8.5.3
- v8.5.2
- v8.5.1
- v8.5.0
- v8.4.3
- v8.4.2
- v8.4.1
- v8.4.0
- v8.3.1
- v8.3.0
- v8.2.15
- v8.2.14
- v8.2.13
- v8.2.12
- v8.2.11
- v8.2.10
- v8.2.9
- v8.2.8
- v8.2.7
- v8.2.6
- v8.2.5
- v8.2.4
- v8.2.3
- v8.2.2
- v8.2.1
- v8.2.0
- v8.1.16
- v8.1.15
- v8.1.14
- v8.1.13
- v8.1.12
- v8.1.11
- v8.1.10
- v8.1.9
- v8.1.8
- v8.1.7
- v8.1.6
- v8.1.5
- v8.1.4
- v8.1.3
- v8.1.2
- v8.1.1
- v8.1.0
- v8.0.44
- v8.0.43
- v8.0.42
- v8.0.41
- v8.0.40
- v8.0.39
- v8.0.38
- v8.0.37
- v8.0.36
- v8.0.35
- v8.0.34
- v8.0.33
- v8.0.32
- v8.0.31
- v8.0.30
- v8.0.29
- v8.0.28
- v8.0.27
- v8.0.26
- v8.0.25
- v8.0.24
- v8.0.23
- v8.0.22
- v8.0.21
- v8.0.20
- v8.0.19
- v8.0.18
- v8.0.17
- v8.0.16
- v8.0.15
- v8.0.14
- v8.0.13
- v8.0.12
- v8.0.11
- v8.0.10
- v8.0.9
- v8.0.8
- v8.0.7
- v8.0.6
- v8.0.5
- v8.0.4
- v8.0.3
- v8.0.2
- v8.0.1
- v8.0.0
- v6.1.4
- v6.1.3
- v6.1.2
- v6.1.1
- v6.1.0
- v6.0.2
- v6.0.1
- v6.0.0
- v5.0.8
- v5.0.7
- v5.0.6
- v5.0.5
- v5.0.4
- v5.0.3
- v5.0.2
- v5.0.1
- v5.0.0
- v4.1.0
- v4.0.4
- v4.0.3
- v4.0.2
- v4.0.1
- v4.0.0
- v3.4.3
- v3.4.2
- v3.4.1
- 3.4.0
- v3.3.1
- v3.3.0
- v3.2.1
- v3.2.0
- v3.1.7
- v3.1.6
- v3.1.5
- v3.1.4
- v3.1.3
- v3.1.2
- v3.1.1
- v3.1.0
- v3.0.6
- v3.0.5
- v3.0.4
- v3.0.3
- v3.0.2
- v3.0.1
- v3.0.0
- v2.0.0
- v1.4.0
- v1.3.3
- v1.3.2
- v1.3.1
- v1.3.0
- v1.2.0
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.11
- v1.0.10
- v1.0.9
- v1.0.8
- v1.0.7
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- v0.5.5
- v0.5.4
- v0.5.3
- v0.5.2
- v0.5.1
- v0.5.0
- v0.4.16
- v0.4.15
- v0.4.14
- v0.4.13
- v0.4.12
- v0.4.11
- v0.4.10
- v0.4.9
- v0.4.8
- v0.4.7
- v0.4.6
- v0.4.5
- v0.4.4
- v0.4.3
- v0.4.2
- v0.4.1
- v0.4.0
- v0.3.3
- v0.3.2
- v0.3.1
- v0.3.0
- v0.2.10
- v0.2.9
- v0.2.8
- v0.2.7
- v0.2.6
- v0.2.5
- v0.2.4
- v0.2.3
- v0.2.2
- v0.2.1
- v0.2.0
- v0.1.18
- v0.1.17
- v0.1.16
- v0.1.15
- v0.1.14
- v0.1.13
- v0.1.12
- v0.1.11
- v0.1.10
- v0.1.9
- v0.1.8
- v0.1.7
- v0.1.6
- v0.1.5
- v0.1.4
- v0.1.3
- v0.1.2
- v0.1.1
- v0.1.0
- dev-development
- dev-feature/improve-database-helper
- dev-feature/project-path-relative
- dev-feature/simplify-exceptions
- dev-feature/array-to-generic-refactor
- dev-feature/plugin-helper
- dev-feature/expect-helper
- dev-feature/user-query-builder
- dev-feature/db-indexes
- dev-feature/query-builder-improvements
- dev-feature/break-users-passwords
This package is auto-updated.
Last update: 2025-04-01 02:49:32 UTC
README
The Wordless project framework.
Directory and files organization
Main directories and files
| assets (Publishable directories)
| \
| | config (Keep base configuration files)
| | stubs (Keep files stubs to generate new ones)
| docker (Local development environment containers to work with framework changes)
| logs (Local development environment log files)
| src
| \
| | Application (Classes implementation, just like in project app directory)
| | \
| | | Cachers (Classes to keep internal caches)
| | | Commands (Wordless CLI commands. Make new as you wish, customize carefully)
| | | Guessers (Classes to guess values)
| | | Helpers (Keep helper classes)
| | | Libraries (Library directories with useful abstractions)
| | | Listeners (Keep listener classes for Wordpress hooks (Events))
| | | Mounters (Class implementations which mount files with dynamic contents from stubs)
| | | Providers (Classes which register any Application class as a group)
| | Core (Core Wordless classes, they raise all framework functionalities)
| | Infrastructure (Abstract classes used by Application and Wordpress)
| | Wordpress (Wordpress adapted class abstractions)
| |>ide_helper.php (File to help IDEs helping the developers using or improving this framework)
| tests (Automated tests)
| \
| | coverage (files with test coverage results in any format)
| | Unit (Class methods unitary tests)
|>composer.json (Composer)
|>console (Wordless CLI file)
|>docker-compose.yml (Docker Compose configurations for local environment to work with framework changes)
|>env.php (Adapted file to load environment variables needed when changing Frameworn into local development environment)
|>phpunit.xml (PHP Unit configuration)
|>wp-cli.yml (WP CLI configuration)
|>wp-config.php (Adapted Wordpress configuration for Framework local development environment)
Relative directories
Inside any main directory we may have the following directories:
| Contracts (Useful Interfaces or abstract classes with abstract methods)
| DTO (Useful DTO implementations to avoid complex array data configuration)
| Enums (Useful Enums to avoid magic values)
| Exceptions (Keeps custom Exceptions. Better then if-else)
| Traits (Traits used to group methods, properties and constants in a scope or to be used in more than one specialized class.)
Docker
To provide a development environment, Wordless Framework offers the following containers:
Workspace
This is the main container, where you can access PHP, Composer, NPM and the Wordless CLI console. Generally, this is where you will interact with your application most of the time. To access it follow the access guide after you have started the containers.
MariaDB
This container is responsible for creating and managing your database.
Adminer
Adminer is a container that allows database interactions through the browser, providing an interface to perform
various tasks necessary for database-related development. Access it via localhost:8081
with your browser.
Commands
Starting containers
To start the containers, use the up
command, which will initiate each container. If the containers haven't been
created, this command will also build them.
The
-d
flag allows you to execute this command in non-verbose mode. In other words, you won't receive the outputs of your containers, leaving the terminal free for other tasks.docker compose up -d
Accessing containers
Once the containers are created and started, you can navigate inside them using the exec
command. Inside each
container, you can leverage all its specific functionalities characteristic of each container. Specify which container
to execute; in this case, we are executing the workspace.
The
--user
flag indicates the user for logging into the container. Usually,laradock
is the default, but in some cases where a profile with greater responsibility is needed, you can useroot
by just don't using this flag.docker compose exec --user=laradock workspace bash docker compose exec workspace bash # as root
Exception codes
Our Exception classes uses standardized codes to give information about the raised problem. The meaning of them is as follows:
- Caught internally: those exceptions should never interrupt application because they are (or should be) always caught by the framework itself everytime it would be thrown;
- Development error: it's a kind of exception that should only interrupt application when a develop mistake occurs;
- Logic control: it controls any application logic. It may be wrapped by a try-catch code or not depending on what developers expect;
- Intentional interrupt: should never be caught, those exceptions are made to ALWAYS interrupt application.