Compare commits

..

1 Commits

Author SHA1 Message Date
Damian Mooyman
7efa75355b Update development dependencies 2017-10-11 17:52:37 +13:00
15 changed files with 86 additions and 142 deletions

View File

@ -1,7 +1,7 @@
{ {
"github-slug": "silverstripe/recipe-cms", "github-slug": "silverstripe/recipe-cms",
"child-stability-inherit": true, "child-stability-inherit": true,
"dependency-constraint": "loose", "dependency-constraint": "exact",
"vendors": [ "vendors": [
"silverstripe" "silverstripe"
], ],

View File

@ -1,11 +0,0 @@
name: CI
on:
push:
pull_request:
workflow_dispatch:
jobs:
ci:
name: CI
uses: silverstripe/gha-ci/.github/workflows/ci.yml@v1

View File

@ -1,16 +0,0 @@
name: Dispatch CI
on:
# At 2:10 PM UTC, only on Thursday and Friday
schedule:
- cron: '10 14 * * 4,5'
jobs:
dispatch-ci:
name: Dispatch CI
# Only run cron on the silverstripe account
if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (github.event_name != 'schedule')
runs-on: ubuntu-latest
steps:
- name: Dispatch CI
uses: silverstripe/gha-dispatch-ci@v1

View File

@ -1,17 +0,0 @@
name: Keepalive
on:
workflow_dispatch:
# The 4th of every month at 10:50am UTC
schedule:
- cron: '50 10 4 * *'
jobs:
keepalive:
name: Keepalive
# Only run cron on the silverstripe account
if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (github.event_name != 'schedule')
runs-on: ubuntu-latest
steps:
- name: Keepalive
uses: silverstripe/gha-keepalive@v1

24
.gitignore vendored
View File

@ -1,6 +1,26 @@
# ignore cache folder
/silverstripe-cache/ /silverstripe-cache/
# ignore .env file
/.env /.env
# ignore build tools
/tools/phing-metadata
# ignore composer vendor folder
/vendor/ /vendor/
# ignore default modules from composer
/asset-admin/
/campaign-admin/
/cms/
/framework/
/graphql/
/reports/
/silverstripe-admin/
/silverstripe-assets/
/silverstripe-errorpage/
/siteconfig/
/themes/simple/ /themes/simple/
/resources/ /versioned/
/public/resources/ /testsession/

View File

@ -1,2 +0,0 @@
RewriteEngine On
RewriteRule ^(.*)$ public/$1

View File

@ -1,6 +1,6 @@
BSD 3-Clause License BSD 3-Clause License
Copyright (c) 2018, SilverStripe Ltd. Copyright (c) 2017, SilverStripe Ltd.
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without

View File

@ -1,9 +1,6 @@
## Silverstripe CMS Recipe ## SilverStripe CMS Recipe
[![CI](https://github.com/silverstripe/recipe-cms/actions/workflows/ci.yml/badge.svg)](https://github.com/silverstripe/recipe-cms/actions/workflows/ci.yml) Base page and asset content-editing recipe for a SilverStripe ([http://silverstripe.org](http://silverstripe.org))
[![Silverstripe supported module](https://img.shields.io/badge/silverstripe-supported-0071C4.svg)](https://www.silverstripe.org/software/addons/silverstripe-commercially-supported-module-list/)
Base page and asset content-editing recipe for a Silverstripe ([http://silverstripe.org](http://silverstripe.org))
installation. This includes the modules: installation. This includes the modules:
Provided by [silverstripe/recipe-core]: Provided by [silverstripe/recipe-core]:
@ -17,17 +14,15 @@ Provided by [silverstripe/recipe-cms]:
* [admin](http://github.com/silverstripe/silverstripe-admin) * [admin](http://github.com/silverstripe/silverstripe-admin)
* [asset-admin](http://github.com/silverstripe/silverstripe-asset-admin) * [asset-admin](http://github.com/silverstripe/silverstripe-asset-admin)
* [campaign-admin](http://github.com/silverstripe/silverstripe-campaign-admin) * [campaign-admin](http://github.com/silverstripe/silverstripe-campaign-admin)
* [versioned-admin](http://github.com/silverstripe/silverstripe-versioned-admin)
* [cms](http://github.com/silverstripe/silverstripe-cms) * [cms](http://github.com/silverstripe/silverstripe-cms)
* [errorpage](http://github.com/silverstripe/silverstripe-errorpage) * [errorpage](http://github.com/silverstripe/silverstripe-errorpage)
* [reports](http://github.com/silverstripe/silverstripe-reports) * [reports](http://github.com/silverstripe/silverstripe-reports)
* [graphql](http://github.com/silverstripe/silverstripe-graphql) * [graphql](http://github.com/silverstripe/silverstripe-graphql)
* [session-manager](http://github.com/silverstripe/silverstripe-session-manager)
* [siteconfig](http://github.com/silverstripe/silverstripe-siteconfig) * [siteconfig](http://github.com/silverstripe/silverstripe-siteconfig)
* [versioned](http://github.com/silverstripe/silverstripe-versioned) * [versioned](http://github.com/silverstripe/silverstripe-versioned)
This can be either added to an existing project or used as a project base for creating a This can be either added to an existing project or used as a project base for creating a
fully featured Silverstripe CMS project. fully featured SilverStripe CMS project.
See the [recipe plugin](https://github.com/silverstripe/recipe-plugin) page for instructions on how See the [recipe plugin](https://github.com/silverstripe/recipe-plugin) page for instructions on how
Silverstripe recipes work. SilverStripe recipes work.

View File

@ -1,13 +0,0 @@
<?php
namespace {
use SilverStripe\CMS\Model\SiteTree;
class Page extends SiteTree
{
private static $db = [];
private static $has_one = [];
}
}

View File

@ -1,33 +0,0 @@
<?php
namespace {
use SilverStripe\CMS\Controllers\ContentController;
class PageController extends ContentController
{
/**
* An array of actions that can be accessed via a request. Each array element should be an action name, and the
* permissions or conditions required to allow the user to access it.
*
* <code>
* [
* 'action', // anyone can access this action
* 'action' => true, // same as above
* 'action' => 'ADMIN', // you must have ADMIN permissions to access this action
* 'action' => '->checkAction' // you can only access this action if $this->checkAction() returns true
* ];
* </code>
*
* @var array
*/
private static $allowed_actions = [];
protected function init()
{
parent::init();
// You can include any CSS or JS required by your project here.
// See: https://docs.silverstripe.org/en/developer_guides/templates/requirements/
}
}
}

View File

@ -5,29 +5,25 @@
"homepage": "http://silverstripe.org", "homepage": "http://silverstripe.org",
"license": "BSD-3-Clause", "license": "BSD-3-Clause",
"require": { "require": {
"php": "^7.4 || ^8.0", "silverstripe/recipe-plugin": ">=0.1@dev <1.0",
"silverstripe/recipe-plugin": "^1.7", "silverstripe/recipe-core": "1.0.0-beta4",
"silverstripe/recipe-core": "4.x-dev", "silverstripe/admin": "1.0.0-beta4",
"silverstripe/admin": "1.x-dev", "silverstripe/asset-admin": "1.0.0-beta4",
"silverstripe/asset-admin": "1.x-dev", "silverstripe/campaign-admin": "1.0.0-beta4",
"silverstripe/campaign-admin": "1.x-dev", "silverstripe/cms": "4.0.0-beta4",
"silverstripe/versioned-admin": "1.x-dev", "silverstripe/errorpage": "1.0.0-beta4",
"silverstripe/cms": "4.x-dev", "silverstripe/graphql": "0.2.7@stable",
"silverstripe/errorpage": "1.x-dev", "silverstripe/reports": "4.0.0-beta4",
"silverstripe/reports": "4.x-dev", "silverstripe/siteconfig": "4.0.0-beta4",
"silverstripe/siteconfig": "4.x-dev", "silverstripe/versioned": "1.0.0-beta4"
"silverstripe/versioned": "1.x-dev",
"silverstripe/graphql": "3.x-dev || 4.x-dev",
"silverstripe/session-manager": "1.x-dev"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^9.5" "phpunit/PHPUnit": "^5.7"
}, },
"extra": { "extra": {
"project-files": [ "project-files": [
"app/src/*" "mysite/code/*"
], ]
"resources-dir": "_resources"
}, },
"config": { "config": {
"process-timeout": 600 "process-timeout": 600

12
mysite/code/Page.php Executable file
View File

@ -0,0 +1,12 @@
<?php
use SilverStripe\CMS\Model\SiteTree;
class Page extends SiteTree
{
private static $db = array(
);
private static $has_one = array(
);
}

View File

@ -0,0 +1,32 @@
<?php
use SilverStripe\CMS\Controllers\ContentController;
class PageController extends ContentController
{
/**
* An array of actions that can be accessed via a request. Each array element should be an action name, and the
* permissions or conditions required to allow the user to access it.
*
* <code>
* array (
* 'action', // anyone can access this action
* 'action' => true, // same as above
* 'action' => 'ADMIN', // you must have ADMIN permissions to access this action
* 'action' => '->checkAction' // you can only access this action if $this->checkAction() returns true
* );
* </code>
*
* @var array
*/
private static $allowed_actions = array(
);
protected function init()
{
parent::init();
// You can include any CSS or JS required by your project here.
// See: https://docs.silverstripe.org/en/developer_guides/templates/requirements/
}
}

View File

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/silverstripe/cms/tests/bootstrap.php" colors="true">
<testsuites>
<testsuite name="recipe-cms">
<directory>vendor/silverstripe/admin/tests</directory>
<directory>vendor/silverstripe/asset-admin/tests</directory>
<directory>vendor/silverstripe/campaign-admin/tests</directory>
<directory>vendor/silverstripe/cms/tests</directory>
<directory>vendor/silverstripe/errorpage/tests</directory>
<directory>vendor/silverstripe/graphql/tests</directory>
<directory>vendor/silverstripe/reports/tests</directory>
<directory>vendor/silverstripe/session-manager/tests</directory>
<directory>vendor/silverstripe/siteconfig/tests</directory>
<directory>vendor/silverstripe/versioned/tests</directory>
<directory>vendor/silverstripe/versioned-admin/tests</directory>
</testsuite>
</testsuites>
</phpunit>

1
public/.gitignore vendored
View File

@ -1 +0,0 @@
/resources/