Skip to content

SS4 Updates#16

Open
mlewis-everley wants to merge 11 commits intoMadeHQ:4.0from
mlewis-everley:4.0
Open

SS4 Updates#16
mlewis-everley wants to merge 11 commits intoMadeHQ:4.0from
mlewis-everley:4.0

Conversation

@mlewis-everley
Copy link
Copy Markdown

Just adding some more SS4 support, I have:

  • Fixed declaration issues and some code bugs
  • Switched to a vendor module
  • Moved code folder to src
  • Moved frontend assets to client and exposed

Comment thread _config.php Outdated
use MadeHQ\Markdown\Forms\MarkdownEditorField;

define('MARKDOWN_MODULE_BASE', basename(dirname(__FILE__)));
define('MARKDOWN_MODULE_BASE', 'mademedia/silverstripe-markdown');
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor question on this, what's the reasoning behind altering this to be hard coded, over just leaving it to be dynamically set in PHP?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think basename(dirname(__FILE__)) will only return the current folder (eg: silverstripe-markdown), in SS4 you need to provide the composer package name when trying to require JS/CSS.

As you guys are using MARKDOWN_MODULE_BASE in all your Requirements calls, it was a little easier to just change this.

I am not sure if there is a way of getting the package name from composer direct...

Copy link
Copy Markdown

@AndrewLowther AndrewLowther left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on a local install of SS4, works like a charm 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants