PHPackages                             svandragt/silverstripe-svdrequirements - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. svandragt/silverstripe-svdrequirements

AbandonedArchivedSilverstripe-module[Utility &amp; Helpers](/categories/utility)

svandragt/silverstripe-svdrequirements
======================================

A convenience module enforcing best practices for using Requirements

4141PHP

Since Apr 14Pushed 10y ago1 watchersCompare

[ Source](https://github.com/svandragt/silverstripe-svdrequirements)[ Packagist](https://packagist.org/packages/svandragt/silverstripe-svdrequirements)[ RSS](/packages/svandragt-silverstripe-svdrequirements/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

SvdRequirements
===============

[](#svdrequirements)

This is a convenience module enforcing best practices for using Requirements.

Features:
---------

[](#features)

- Combine a mixed list of JS / CSS assets using a single method.
- Access to the `$this->theme_dir` variable in your page controllers.

SvdRequirements will seperate the js from the css files, and combine them for each controller.

Usage:
------

[](#usage)

1. Install using composer: `composer require "svandragt/silverstripe-svdrequirements:*"`

Example: you might have a `Page` and `HomePage extends Page` class, each with dozen JS and CSS requirements. Add `SvdRequirements::combine($assets);` to each init method.

Done!

In our example the site will now have the following files:

```
page_controller.css
homepage_controller.css
page_controller.js
homepage_controller.js

```

Quick access to theme folder
----------------------------

[](#quick-access-to-theme-folder)

This optional SvdRequirementsExtension (enabled by default) adds a shortcut to the theme folder by setting a `$theme_dir` property to the Page\_controller which you can access through `$this->theme_dir` - which would return 'themes/simple' for example.

You can convert the simple theme to use requirements in 2 steps:

1. Remove all calls to CSS and JS from the templates.
2. to the Page's init() method add the following code:

```
$assets = array(
	"{$this->theme_dir}/css/reset.css",
	"{$this->theme_dir}/css/layout.css",
	"{$this->theme_dir}/css/typography.css",
	"{$this->theme_dir}/css/form.css",
	"{$this->theme_dir}/javscript/script.js",
);
SvdRequirements::combine($assets);
```

I keep a [list of known bugs](https://github.com/svandragt/silverstripe-svdrequirements/issues).

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/a42fc2280fbcf46560c203bb7a0dc56a26ab8cf99f574b6aeb3f2cb95eaa3862?d=identicon)[svandragt](/maintainers/svandragt)

---

Top Contributors

[![svandragt](https://avatars.githubusercontent.com/u/594871?v=4)](https://github.com/svandragt "svandragt (20 commits)")

### Embed Badge

![Health badge](/badges/svandragt-silverstripe-svdrequirements/health.svg)

```
[![Health](https://phpackages.com/badges/svandragt-silverstripe-svdrequirements/health.svg)](https://phpackages.com/packages/svandragt-silverstripe-svdrequirements)
```

###  Alternatives

[thalidzhokov/country-codes

CountryCodes PHP Class to get array of countries with ISO 3166-1 alpha-2, ISO 3166-1 alpha-3, ISO 3166-1 numeric and ISD codes it can provide following information related to country

13111.5k](/packages/thalidzhokov-country-codes)

PHPackages © 2026

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