specbee/drupal-recommended-starterkit
Composer 安装命令:
composer create-project specbee/drupal-recommended-starterkit
包简介
Project template for Drupal projects with a relocated document root
README 文档
README
A Drupal StarterKit Project template based out of Drupal Recommended Project and Drupal Composer Template to create Drupal projects with out-of-box required tools and packages to kickstart a project.
What is included
- Drupal core
- Drush 12
- Grumphp(A PHP code-quality tool)
- DDEV
- DotEnv
- Config Sync Without Site UUID
Installation
Create a new project with Composer create project command from dev version.
composer create-project specbee/drupal-recommended-starterkit:10.x-dev
--no-interaction drupal10
cd drupal10
ddev start
This will install drupal 10.3.0-beta1
For drupal 10.2.6 run the below command:
composer create-project specbee/drupal-recommended-starterkit:1.0.0
--no-interaction drupal10
cd drupal10
ddev start
For drupal 11.0.0-beta1 run the below command:
composer create-project specbee/drupal-recommended-starterkit:2.0.0
--no-interaction drupal11
cd drupal10
ddev start
Please note: You'll need DDEV 1.23.0 or later. See the documentation if you need to upgrade.
You can update the local development configurations for Local Development in the
.ddev/config.yml file. For example, to change the project name update the
name parameter in the configuration file.
Adding Packages
Use composer require to include and download dependencies for your project.
cd some-dir
composer require drupal/devel
Adding Libraries
You can manage front-end asset libraries with Composer thanks to the asset-packagist repository. Composer will detect and install new versions of a library that meet the stated constraints.
composer require bower-asset/dropzone
Using GrumPHP
The package setups code quality checking tools for Drupal project during git commits.
Forcing commit message format
To configure commit message structure, use the git_commit_message task. For example, to enforce the commit message contains the Jira issue ID, use the rule as the following snippet. More options are documented online.
# grumphp.yml grumphp: tasks: git_commit_message: matchers: "Must follow the pattern": '/(^JIRA-[0-9]+(: )[^ ].{5,}\.)|(Merge branch (.)+)/'
Using DotEnv
You can now add environment variables to your .env file and it will
automatically be available in the $_ENV global var.
You can use it in settings.php, in service providers or in other places
throughout your code. Some examples:
<?php // phpcs:ignore // settings.php. $databases['default']['default'] = [ 'database' => $_ENV['DB_DATABASE'], 'username' => $_ENV['DB_USERNAME'], 'password' => $_ENV['DB_PASSWORD'] ?? '', 'prefix' => '', 'host' => $_ENV['DB_HOST'] ?? 'localhost', 'port' => $_ENV['DB_PORT'] ?? 3306, 'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql', 'driver' => 'mysql', ]; $config['mandrill.settings'] = [ 'mandrill_api_key' => $_ENV['MANDRILL_API_KEY'], ];
// phpcs:ignore <? php namespace Drupal\yourmodule; use Drupal\Core\DependencyInjection\ContainerBuilder; use Drupal\Core\DependencyInjection\ServiceProviderInterface; /** * Sample class. */ class YourmoduleServiceProvider implements ServiceProviderInterface { /** * Sample method. */ public function register(ContainerBuilder $container) { $container->setParameter('yourmodule.some_secret', $_ENV['SOME_SECRET']); } } php ?>
On live environments, you should invoke drush dotenv:dump every time your
.env file changes. If you don't, the .env file will be loaded at every
request, which will decrease the performance of your application.
You can use the drush dotenv:dump command to get debugging info about the
scanned dotenv files and the loaded variables.
Read the Symfony documentation for more information.
specbee/drupal-recommended-starterkit 适用场景与选型建议
specbee/drupal-recommended-starterkit 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 78 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 05 月 20 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 specbee/drupal-recommended-starterkit 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 specbee/drupal-recommended-starterkit 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 78
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 17
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2024-05-20