thbighead / wordless-framework
Wordless Framework。
v8.2.8
2024-10-03 18:41 UTC
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.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-feature/providers-redistribution
- dev-development
This package is auto-updated.
Last update: 2024-10-03 18:42:02 UTC
README
Wordless 项目框架。
目录和文件组织
主要目录和文件
| 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)
相对目录
在任何一个 主目录 中,我们可能有以下目录
| 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
为了提供一个开发环境,Wordless Framework 提供以下容器
工作空间
这是主要容器,您可以通过它访问 PHP、Composer、NPM 和 Wordless CLI 控制台。通常,这是您将与应用程序交互的大部分时间。要访问它,请在 访问指南 中按照说明操作,在您已 启动容器 后。
MariaDB
这个容器负责创建和管理您的数据库。
Adminer
Adminer 是一个允许通过浏览器进行数据库交互的容器,提供了一个界面来执行与数据库相关开发所需的各种任务。通过浏览器在 localhost:8081 访问它。
命令
启动容器
要启动容器,使用 up 命令,该命令将启动每个容器。如果容器尚未创建,此命令还将构建它们。
使用
-d标志可以在非详细模式下执行此命令。换句话说,您不会收到容器的输出,这将使终端可用于其他任务。docker compose up -d
访问容器
一旦容器创建并启动,您可以使用 exec 命令在容器内导航。在每个容器内,您可以利用每个容器的特定功能。指定要执行的容器;在这种情况下,我们正在执行工作空间。
使用
--user标志指示登录容器的用户。通常,laradock是默认值,但在某些需要更高权限配置文件的情况下,您可以通过不使用此标志来使用root。docker compose exec --user=laradock workspace bash docker compose exec workspace bash # as root
异常代码
我们的异常类使用标准化的代码来提供有关抛出问题的信息。它们的意义如下
- 内部捕获:这些异常不应中断应用程序,因为它们(或应该总是)在每次抛出时被框架本身捕获;
- 开发错误:这是一种只有在开发错误发生时才会中断应用程序的异常;
- 逻辑控制:它控制任何应用程序逻辑。它可能被 try-catch 代码包裹,也可能没有,这取决于开发者的期望;
- 有意中断:不应捕获这些异常,这些异常是为了始终中断应用程序而创建的。