GithubHelp home page GithubHelp logo

sulu / sulu Goto Github PK

View Code? Open in Web Editor NEW
1.1K 51.0 322.0 135.32 MB

Core framework that implements the functionality of the Sulu content management system

Home Page: https://sulu.io

License: MIT License

PHP 69.00% Shell 0.01% JavaScript 29.59% CSS 0.06% VCL 0.03% SCSS 1.03% Twig 0.29%
php symfony sulu cms cmf admin hacktoberfest

sulu's Introduction


Sulu logo


GitHub license GitHub tag (latest SemVer) Test workflow status GitHub commit activity GitHub contributors Packagist downloads


Sulu is a highly extensible open-source PHP content management system based on the Symfony framework. Sulu is developed to deliver robust multi-lingual and multi-portal websites while providing an intuitive and extensible administration interface to manage the full content lifecycle.

Have a look at the official Sulu website for a comprehensive list of Sulu's features, core values and use cases.


Sulu Slideshow


This repository contains the core framework of the Sulu content management system. The framework implements the functionality that is built into the Sulu content management system and therefore is a dependency of all Sulu projects.

If you want to start a new Sulu project, you might be interested in the sulu/skeleton template repository. If you are planning to extend your existing Sulu project, visit the Sulu organization on GitHub for a complete list of official Sulu bundles.

🚀  Installation and Documentation

The sulu/skeleton repository provides a pre-configured project template to quick-start your development. Visit the official Sulu documentation to find out how to use the project template for starting your own Sulu project.

❤️  Community and Contributions

The Sulu content management system is a community-driven open source project backed by various partner companies. We are committed to a fully transparent development process and highly appreciate any contributions. Whether you are helping us fixing bugs, proposing new feature, improving our documentation or spreading the word - we would love to have you as part of the Sulu community.

📫  Have a question? Want to chat? Ran into a problem?

We are happy to welcome you in our official Slack channel or answer your questions via GitHub Discussions! Obviously you can always reach out to us directly via the Sulu twitter account or post your question on StackOverflow with the official sulu tag.

🤝  Found a bug? Missing a specific feature?

Feel free to file a new issue with a respective title and description on the the sulu/sulu repository. If you already found a solution to your problem, we would love to review your pull request! Have a look at our contribution guidelines to find out about our coding standards.

✅  Requirements

Sulu requires a PHP version higher or equal to 8.0 and is compatible with every Symfony version starting from 5.4. Have a look at the require section in the composer.json of the sulu/sulu core framework to find an up-to-date list of the requirements of Sulu content management system.

📘  License

The Sulu content management system is released under the under terms of the MIT License.

sulu's People

Contributors

alexander-schranz avatar b3h3m0th avatar c00n84 avatar chirimoya avatar christianbader avatar danrot avatar dantleech avatar erfanebrahimnia avatar florianboe avatar janmassive avatar kfrohwein avatar kriswillis avatar luca-rath avatar mamazu avatar martinlagler avatar michaelzangerle avatar mmsbrggr avatar niklasnatter avatar notsure avatar plozmun avatar prokyonn avatar quehnie avatar quingkhaos avatar renezumtobel avatar shahparshabani avatar thomasduenser avatar tomsvogel avatar trickreich avatar turbo-ele avatar wachterjohannes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sulu's Issues

check portal recognition on performance

Currently the URL is checked with cutting away the slashes, maybe this can be improved with a start with clause (be careful that the correct portal matches, and not only the only the one with the shortest URL).

The redirect should also be defined using a default language/segment instead of manual definition.

Dump is too big => 500 (Internal Server Error)

It's only possible to dump something like link.title (a special property), but not dump(link) alone, because it's bigger than the allowed memory size. link.toArray() is also too big. Would be useful.

[RFC] CND files for node types

The sulu:phpcr:init command could be removed and replaced with the doctrine:phpcr:node-type:register command (currently only in dev-master).

This new command automatically registers node types found in the Resources/config/phpcr-node-types directory.

To replace the functionality we would also need to replace the hard-coded NodeTypeDefinition classes and replace them with cnd files, e.g.

# Resources/config/phpcr-node-types
<sulu ns="http://sulu.io.phpcr">

[sulu:content] > nt:base
mixin

[sulu:foobar] > nt:unstructured
myprop (String) required

This should also make us more flexible with regards to using node types, as each bundle would able to easily define its own node types. (f.e. [suluLocation:location])

Cache Structure more efficiently

The structures should be cached in a more efficient way. The constructor should not call methods which loop over all tags and so on. Have a look at the mechanism in the Webspace Component, where only keys instead of entire objects are serialized, and put together afterwards.

Wrap the PHPCR Session

Actually, everytime we call $phpcrNode->setProperty we have to call

$phpcrNode->setPropertyValue($multipleTranslatedProperties->getName('foobar'));

i.e. we must work out the translated name of the foobar property.

This means that we have a dependency on the MultipleTranslatedProperties class in all places which talk to the PHPCR Nodes.

This can be avoided by putting this logic in the node itself:

$phpcrNode->setTranslatedProperty('foobar', 'barfoo');
$phpcrNode->getTranslatedPropertyValue('foobar'); // "barfoo"

This would avoid the dependency in multiple places and remove much code.

Missing List Helper Functions

  • fallbacks for locale example load entity in created language when not available in requested language
  • combined fields for example contact fullname = firstname + lastname
  • fields array for example media previews, media content languages, media publish languages or media tags
  • add support for join conditions
  • add default fields
  • add possibility to sort fields
  • add support for min-width
  • add support for editable fields
  • add field descriptor for arbitrary expressions e.g. true if contact is main contact for account

[RFC] Behat tests?

I think it might be beneficial to introduce behat tests somehow.

For example, we could write a specification:

Scenario: A german page is requested and shadow content exists for that content
    Given the page "/de/my-page" has shadow content for "de" which maps to "fr"
    Given I request the URL "/de/my-page"
    Then the response should have a "200" status code
    And the response should contain "Cette page est en français"

Scenario: A german page is requested there is no shadow version
    ...
    Then the response should have a "404" status code

etc.

Another usecase might be for actually installing Sulu:

Scenario: Installing Sulu
    Given I run the "composer install sulu-cmf/sulu-standard" shell command
    Then the command should exist with status "0"
    And I run the "./app/console" command
    Then I should see
    """"
    Sulu CMF Version 0.6
    """"

See also:

Use consistent localization codes

The use of localization codes is not consistent (sometimes de_at, sometimes de-at). We should stick with one representation in the API and transfer them at the appropriate places.

The following code lines show what I mean:
https://github.com/sulu-cmf/sulu/blob/e4404de197fc8a77a86f388b379548025a3116fd/tests/Sulu/Component/Content/Mapper/ContentMapperTest.php#L1474
https://github.com/sulu-cmf/sulu/blob/e4404de197fc8a77a86f388b379548025a3116fd/tests/Sulu/Component/Content/Mapper/ContentMapperTest.php#L1481

Save old Template data

Should we save old template data?
these two posibilities:

  • clear all node properties within change template
  • store data for each template in a own node

Remove InstallKernelCommand

This command only creates directories (logs and cache) but this should not be necessary as Symfony does this automatically.

Cannot pass query parameters to website

http://sulu.lo/de/my-new-page?XDEBUG_SESSION_START=foobar

This could be problematic in some use cases (e.g. if the client has a page with dynamic parameters).

Handle the title attribute in templates in a special way

The title attribute has a very special meaning in our context, because it is used at some places implicitly (generating a name for the PHPCR-Nodes, it is used in the URL and so on), but it is not a mandatory field in a template.

This behavior definitely has to change, and IMHO we have two possibilities:

  • We can check the given template for a field named title, and throw an exception if it doesn't have. This approach would have the advantage that a title does not necessarily have to be a text line.
  • Or we introduce the title field in every template implicitly, which would probably be less error-prone.

Content page PathNotFound exception returned by server

After initially installing and initialising my webspace I go to the content page and - nothing happens.

A 500 is returned from the nodes endpoint because it is requesting a non-existant path.

  • My admin locale is en
  • The path it cannot find is /cmf/foobar_lo/routes/en
  • Because my webspace is only configured for fr
  • If I change my locale to de then it tries to get /cmf/foobar_lo/routes/de
  • I only have en and de avialble as admin locales.

However, for some unknown reason, now it is working and pulled in /cms/foobar_lo/routes/fr.

So an issue: The default locale for the content page should not use locales which do not exist in the webspace.

And a question: Where do I define the admin locales? e.g. there is en and de but I cannot find where this is configured/hard-coded.

Adapt to Husky CSS refactoring (when it happens)

Currently entire CSS classes are copied and pasted into each bundle and variables are not reused.

We need to refactor the code CSS be more DRY and sensible.

This would start with defining general classes in Husky.

[RFC] Renamings of request analyzer methods

https://github.com/sulu-cmf/sulu/blob/feature/sulu-build/src/Sulu/Component/Webspace/Analyzer/RequestAnalyzer.php

  • For all methods Current prefix is redundant (?) and implies that there is another state (i.e. what would getPortal return if not the "current" portal?)
  • getResource[Locator|LocatorPrefix] => getResourcePath: Because Locator is a typical class name used by Locator classes, whilst Path is the most commonly used word to describe the "path" of a node within a repository.

Online demo

Hi,

Would be great to have an online demo to test your project.

Thanks

Nico

ListRestHelper projects database structure to the outside

Currently the ListRestHelper resp. the ListQueryBuilder are using the fields-parameter from the Request to resolve relations in the database. This works for some basic entities, but in general it is easily possible that the representation in the database and the API differs.

Because of this we should the controller let resolve the field names, and refactor the ListQueryBuilder to build the Queries in a different way, and rename some functions, as the fields will be less declarative afterwards.

Make ContentMapper independent of SuluSecurity User

The content mapper is currently dependent on the user object of Sulu. There are three possibilities to solve this issue:

  • Pass the user data as a parameter to the ContentMapper
  • Create a UserInterface in the sulu-library
  • Put the entire security part into the library

Date format

Date should be formatted and internationalized to be shown in datagrid

Change LIKE for search fields in RestController

There shouldn't be a LIKE statement on integer fields, because this makes problems with PostgreSQL. This happens when resolving the search parameter in the list functionality. In general there should also be a $defaultSearchParameter for the RestControllers.

Also add missing tests for case without search fields, but a search parameter.

use DoctrinePHPCRBundle

I noticed that commands like app/console doctrine:phpcr:node:dump are not working since it seems like you are defining the PHPCR session in the Sulu core bundle yourself. If you want to centralize all such configuration into Sulu core, you can use PrependExtensionInterface for this to push the configs from Sulu core to other bundles (see CMF CoreBundle for an example of this):
https://github.com/symfony-cmf/CoreBundle/blob/master/DependencyInjection/CmfCoreExtension.php#L32

docs are here:
http://symfony.com/doc/current/cookbook/bundles/prepend_extension.html

ContentTypeManager

a content type manager must be implemented to remove dependency on service container

[RFC] Single repository?

I think having a single repository could be beneficial:

  • It makes refactoring easier
  • Its easier to control dependencies
  • Its easier to switch context (i.e. no need to manage multiple git branches in multiple repository)
  • Easier to make releases
  • Increase stability -- we reduce developer errors due to inconsistent package versions.
  • git grep - you can git grep to find files (which is really fast)

We can still use the git subtree split to provide individual packages.

Both Symfony and Sylius have choosen this approach. In my old CMS we also started using separate repositories for some bundles - eventually the overhead became a pain and we switched to a single repository and it made life easier.

Any reasons not to do this?

DoctrineFieldDescriptor needs different aliases when a relation to the same entity exists more than once

The current workaround is to use different aliases for the entity names when creating the DoctrineFieldDescriptors

$this->fieldDescriptors['contact'] = new DoctrineFieldDescriptor(
    'id', 'contact', self::$contactEntityName . '1',
    array(
        self::$contactEntityName . '1' => self::$entityName . '.contact'
    ),
    true
);

$this->fieldDescriptors['assignedContact'] = new DoctrineFieldDescriptor(
    'lastName', 'assignedContact', self::$contactEntityName . '2',
    array(
        self::$contactEntityName . '2' => self::$entityName . '.assignedContact'
    )
);

Used in the activity controller.

Introduce request context class

Currently some parameters which apply to the entire request are passed explicitly to classes such as ContentType. This is inflexible (you can't introduce other parameters) and redundant (they are not always used).

For examaple $webspaceKey, $languageCode' and$segmentCode`.

https://github.com/sulu-cmf/sulu/blob/develop/src/Sulu/Component/Content/ContentTypeInterface.php#L42

It might be a good idea to replace this approach by injecting a context object which could provide access to such global variables.

Implement a cleanup service

Extract the cleanup method of the ContentMapper and the PhpcrMapper into an own service (strategy pattern), to make this classes simpler, and remove the unnessecary code duplication.

Install error (incentiv parameters) (phpcr.yml does not exist)

We should avoid this as currently doing a composer install on a new checkout will always result in an exception.

[Symfony\Component\Config\Exception\FileLoaderLoadException]                                                                                                                                                                                                                                                            
  Cannot import resource "../../Resources/config/phpcr.yml" from "/home/daniel/www/sulu-cmf/sulu-standard-1/app/admin/config/../../Resources/config/config.yml". (The file "../../Resources/config/phpcr.yml" does not exist (in: /home/daniel/www/sulu-cmf/sulu-standard-1/app/admin/config/../../Resources/config, ).)

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.