Git Product home page Git Product logo

recipe-cms's Introduction

Silverstripe CMS Recipe

CI Silverstripe supported module

Base page and asset content-editing recipe for a Silverstripe (http://silverstripe.org) installation. This includes the modules:

Provided by [silverstripe/recipe-core]:

Provided by [silverstripe/recipe-cms]:

This can be either added to an existing project or used as a project base for creating a fully featured Silverstripe CMS project.

See the recipe plugin page for instructions on how Silverstripe recipes work.

recipe-cms's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

recipe-cms's Issues

Add new login forms module to recipe

It's a requirement of installing the MFA module, which we might make a part of our default recipe eventually. But until then, the restyled login forms themselves provide great value as part of the default recipe: https://github.com/silverstripe/silverstripe-login-forms

Ideally we find a way to only install them in new 4.x installs, and add upgrade instructions for how to opt-in to them for upgrading projects.

Pull Requests

Additional CMS Pattern Library improvements.

Description

The following improvements need to be made:

  • Replace 4 space indent with a 2 space. ESlint doesn't help.
  • Introduce a new library @storybook/addon-docs to present documentation to the components.
  • Fix / investigate the reasons for some small warnings that happens time to time in browser console when storybook is running.

AC's

  • Component stories have 2 space indent everywhere in the code.
  • @storybook/addon-docs is implemented and all stories that have pre-existing readme doc are using it.
  • If possible there are not any warnings in the console when storybook is running.

PR's

Page and PageController show up in IDEs as valid classes

When using an IDE's "find class" feature, Page and PageController will often match two different files (the one in the project and the one in recipe-cms).

Please can we rename the files to have an extension like .tmpl or whatnot so that IDEs don't recognise them as PHP classes.

When we copy the files into projects we can copy and rename them instead to just copying them.

Related PRs

GraphQL v3 not installable in dev branches

Cow has incorrectly left out the v3 dependencies for graphql in the 4 and 4.12 branches during merge up.
The actual 4.12.0 stable tag has the correct dependencies.
We already have a card to resolve cow's issues with dual dependencies: silverstripe/cow#207

Acceptance criteria:

  • The development branches allow installing the appropriate branch for graphql v3

PRs

Can't install 1.1.x-dev

composer create-project silverstripe/installer test 4.x-dev 
Installing silverstripe/installer (4.x-dev c9787b772d0d89635acb40192aae6de1ac4286cb)
  - Installing silverstripe/installer (4.x-dev c9787b7): Cloning c9787b772d from cache
Created project in test
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for silverstripe/recipe-cms 1.1.x-dev -> satisfiable by silverstripe/recipe-cms[1.1.x-dev].
    - silverstripe/recipe-cms 1.1.x-dev requires silverstripe/recipe-plugin >=0.1@dev <1.0 -> satisfiable by silverstripe/recipe-plugin[0.1.0, 0.2.0] but these conflict with your requirements or minimum-stability.

Add Travis builds

The optional SilverStripe recipes (form building, collaboration etc) have all got Travis builds which run the test suites of the modules contained within the recipes. This helps us (A) to know that integration test suites are passing, and (B) to know that any config or project files we add work in context.

We should add Travis builds to this repository and the core recipe

Matching issue: silverstripe/recipe-core#29

Re-tag as 4.x

The companion to silverstripe/recipe-core#24 for this recipe.

It's probably more important that we get this sorted for the CMS recipe as that's the one that people are being instructed to use as part of upgrades.

Delete the 1 branch on this and recipe-core

Recipe 1.x is deprecated. The current tags should be retained to avoid breaking people's sites, but no new releases should be made. As such I think we should delete the 1, 1.0, and 1.1 branches.

We should do the same to recipe-core as well.

Add silverstripe/session-manager

On enhancing the session-manager module, it's something that's likely to provide broad benefit and is almost a baseline feature for any CMS or tool where software users manage their profile.

When considering the path of least resistance on making this module available to projects, this recipe was considered the best place to add it.

Other options that were considered were, from widest distribution to least distribution:
a) require as part of silverstripe/admin (aka "add it to core")
b) require as part of silverstripe/recipe-cms (not recipe-core, that does not include admin)
c) require as part of silverstripe/installer
d) require as part of silverstripe/silverstripe-security-extensions (not even sure what uses this?)
e) manually add to project (this is always an option)

Questions of stability

The silverstripe/session-manager module has been out in the wild for some time with a 0.x tag while early testing and feedback is sought.

We've been managing a bit of testing and user feedback internally, which will help us confirm confidence in tagging the module as stable and including it in this recipe.

Implementation tasks

Tasks required as part of this issue could be:

  • Tag the module as stable
  • Add the module to recipe-cms
  • Tag session-manager version 1.1.0 when all PR's merged and create 1.1 branch
  • After PR adding module to recipe-cms has been merged, ensure that session-manager pre-stable is removed from project skeleton
  • Ensure the next changelog reflects this change
  • Move userhelp docs into core (and out of the 'optional modules' section). See: silverstripe/silverstripe-session-manager#85

PRs - update unit tests to use logInAs()

PRs - follow up

PR - update recipe-cms

  • #48 (merge after PRs above)

PRs - Docs

PRs - Sink (remember to merge-up)

SwiftMailer v6 not allowing spaces at start or end of email addresses

TODO

  • Probably skip some framework tests related to RememberLoginHash if session-manager is present and rely on the session-manager unit tests instead - see comment below

Recipe CMS 1.2.X breaks semantic versioning

The problem
I had failing tests in Travis because I was pulling down Recipe-CMS 1.2.
https://github.com/silbinarywolf/silverstripe-phpstan/blob/dev-ss4/.travis.yml#L25

I had to update my PHPStan tests to allow for two different types, SiteTree / SiteTreeLink:
https://github.com/silbinarywolf/silverstripe-phpstan/blob/dev-ss4/tests/Reflection/SiteTreeMethodClassReflectionExtensionTest.php#L79

This was caused by this:
silverstripe/silverstripe-versioned#75 (comment)

The solution
Since the public return types of a function have been changed, I think Recipe-CMS should be bumped to the next MAJOR version so it adheres to semantic versioning. (And anything else that uses the future version of silverstripe-versioned will need a MAJOR bump)

Multiple Deprecation errors after recipe-cms update 4.11 to 4.12

Hi Team,

We have just updated recipe-cms 4.11 to 4.12 after that when we build project we star getting errors on CLI as well on WEB Page.

Errors:

PHP Deprecated: SilverStripe\Core\BaseKernel->getEnvironment is deprecated. Use Director::get_environm
ent_type() instead. Called from SilverStripe\Control\Director::get_environment_type. in /var/www/vendor
/silverstripe/framework/src/Dev/Deprecation.php on line 253

PHP Deprecated: SilverStripe\Core\BaseKernel->sessionEnvironment is deprecated. Use Director::get_sess
ion_environment_type() instead. Called from SilverStripe\Core\BaseKernel->getEnvironment. in /var/www/v
endor/silverstripe/framework/src/Dev/Deprecation.php on line 253

PHP Deprecated: SilverStripe\Core\BaseKernel->getEnvironment is deprecated. Use Director::get_environm
ent_type() instead. Called from SilverStripe\Control\HTTPApplication->getEnvironmentType. in /var/www/v
endor/silverstripe/framework/src/Dev/Deprecation.php on line 253

PHP Deprecated: SilverStripe\Core\BaseKernel->sessionEnvironment is deprecated. Use Director::get_sess
ion_environment_type() instead. Called from SilverStripe\Core\BaseKernel->getEnvironment. in /var/www/v
endor/silverstripe/framework/src/Dev/Deprecation.php on line 253

PHP Deprecated: SilverStripe\Core\BaseKernel->getEnvironment is deprecated. Use Director::get_environm
ent_type() instead. Called from SilverStripe\Core\BaseKernel->bootPHP. in /var/www/vendor/silverstripe/
framework/src/Dev/Deprecation.php on line 253

PHP Deprecated: SilverStripe\Core\BaseKernel->sessionEnvironment is deprecated. Use Director::get_sess
ion_environment_type() instead. Called from SilverStripe\Core\BaseKernel->getEnvironment. in /var/www/v
endor/silverstripe/framework/src/Dev/Deprecation.php on line 253

ERROR [User Deprecated]: SilverStripe\Versioned\Versioned->allVersions is deprecated. Use Versions() in
stead. Called from SilverStripe\Versioned\Versioned->Versions.
IN GET dev/build
Line 253 in /var/www/vendor/silverstripe/framework/src/Dev/Deprecation.php

ERROR [User Deprecated]: SilverStripe\Control\HTTP::augmentState is deprecated. Use HTTPCacheControlMid
dleware instead. Called from SilverStripe\Control\Middleware\HTTPCacheControlMiddleware->process.
IN GET dev/build
Line 253 in /var/www/vendor/silverstripe/framework/src/Dev/Deprecation.php

ERROR [User Deprecated]: Config SilverStripe\Control\HTTP.cache_ajax_requests is deprecated. 'HTTP.cach
e_ajax_requests config is deprecated.
IN GET dev/build
Line 221 in /var/www/vendor/silverstripe/framework/src/Dev/Deprecation.php

Help us here please.

Short array syntax: [] vs array()

I notice that Page.php and PageController.php use the array() notation. However, the installer specifies that at least php 5.6 is required, so the shorter [] notation is always available. Should we not encourage this new syntax by starting the default Page class with it?

PSR does not really make a point about it, but it seems a de facto standard since they do use it in their examples. I do notice that the Framework and CMS packages have a mix of both, but using the new syntax in the Page.php and PageController.php classes could be a first step towards encouraging both old and new developers to use it everywhere.

Also see this StackOverflow issue. I would agree with the statement "Only use array() if you want your script to run on PHP <5.4."

Using Recipe-CMS as project base fails (install.php needs missing assets folder)

Trying to create project via composer using this repo as a base (as suggested in the readme) fails to fully install necessary files.

composer create-project silverstripe/recipe-cms --prefer-dist .

Go to localhost/websitename (in this case project folder was callled contracts)

( ! ) Fatal error: Uncaught UnexpectedValueException: RecursiveDirectoryIterator::__construct(C:\wamp64\www\contracts\public\assets,C:\wamp64\www\contracts\public\assets): The system cannot find the file specified. (code: 2) in C:\wamp64\www\contracts\vendor\silverstripe\framework\src\Dev\Install\InstallRequirements.php on line 288
--

1 | 0.0022 | 407152 | {main}( ) | ...\install.php:0
2 | 0.0057 | 408040 | include( 'C:\wamp64\www\contracts\vendor\silverstripe\framework\src\Dev\Install\install.php' ) | ...\install.php:15
3 | 0.0083 | 409080 | include( 'C:\wamp64\www\contracts\vendor\silverstripe\framework\src\Dev\Install\install5.php' ) | ...\install.php:25
4 | 0.2722 | 682280 | SilverStripe\Dev\Install\InstallRequirements->check( ) | ...\install5.php:69
5 | 0.2841 | 691544 | __construct ( ) | ...\InstallRequirements.php:288

Either the assets folder needs to be included as in the installer repo, or the readme should be updated to indicate this can't be used as a project base.

Workaround
just copying and pasting in the assets folder and its files from the installer repo mitigates this issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.