Giter Club home page Giter Club logo

contao-manager's Introduction

Contao Open Source CMS

About

Contao is a powerful open source CMS that allows you to create professional websites and scalable web applications. Visit the project website for more information.

Purpose

The purpose of this package is to develop the Contao bundles in a monorepo. Use it when you want to create a pull request or report an issue.

The monorepo is automatically split into separate packages:

Please do not use contao/contao in production! Use the split packages instead.

Platinum partners

Thanks to our platinum partners for helping us fund the development of Contao.

Development

To create a pull request and to test your changes within a running Contao application, it is the easiest to use the Contao Managed Edition. Start by installing it in your current directory:

composer create-project --no-install contao/managed-edition <directory> <branch>

Replace <directory> with the directory where you want to install the Managed Edition (use . for the current directory). Replace <branch> with 5.x-dev if you want to add a new feature, or with <lts-version>.x-dev (currently 4.13.x-dev) if you want to fix a bug.

Then adjust the require section in your composer.json file, so Composer loads the monorepo instead of the individual bundles:

"require": {
    "php": "^8.1",
    "contao/contao": "5.x-dev"
},

Again, use 5.x-dev if you want to add a new feature or <lts-version>.x-dev if you want to fix a bug.

Next, install the dependencies:

composer update

Composer automatically clones the Git repository into the vendor/contao/contao folder. You can complete the setup by running vendor/bin/contao-setup on the command line.

Any changes you make in vendor/contao/contao will be tracked via Git, so you can submit your pull request directly from your application.

Running scripts

First install the code quality tools:

composer bin all install

Then run the code quality scripts via Composer:

composer all

You can also run the scripts separately:

composer rector
composer ecs
composer service-linter
composer monorepo-tools
composer unit-tests
composer functional-tests
composer phpstan
composer depcheck

Use the -- argument to pass additional flags to the underlying commands:

composer unit-tests -- --filter CoreBundle
composer ecs -- --clear-cache

Functional tests

To set up the functional tests, create a database named contao_test:

mysql -e "CREATE DATABASE contao_test"

If your database uses credentials, copy the file core-bundle/phpunit.xml.dist to core-bundle/phpunit.xml and adjust the following line:

<php>
    <env name="DATABASE_URL" value="mysql://root@localhost:3306/contao_test" />
</php>

Then run the functional tests via Composer:

composer functional-tests

Node.js

To build the assets, you need a Node.js version >= 18.12. Then run these commands:

npm ci
npm run build

End-to-end tests

The Contao end-to-end tests are availabe as an NPM package. You can install and run them like this:

npm install contao-e2e-tests --save-dev
npx contao-e2e-tests

License

Contao is licensed under the terms of the LGPLv3.

Getting support

Visit the support page to learn about the available support options.

contao-manager's People

Contributors

akroii avatar aschempp avatar ausi avatar cliffparnitzky avatar doishub avatar floxn avatar fritzmg avatar gmpf avatar juliensteininger avatar katgirl avatar leofeyer avatar lorenzbausch avatar manuelm avatar mdevster avatar najbo avatar oliverjkb avatar reneluecking avatar taca avatar toflar avatar webkp avatar xchs avatar zoglo 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

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

contao-manager's Issues

Adjust file names

Files of the Contao Manager must not be tenside-related (though noone cares what the bundles are named!).

  • contao-manager.phar.php for the PHAR
  • contao-manager.json for the config / auth file
  • contao-manager/ for the configuration folder

Enable/disable packages

Disabling a package should disable the plugin registered in it's composer.json.

Packages are enabled by default after installation, so the Managed Edition needs to keep a list of disabled packages (probably using the contao-api).

Add progress when searching packages

We must add some sort of progress because it takes too long and people will abort the operation.

@discordier any idea what we could tell? Maybe the hosts we're searching? "Sending", "waiting for response from", etc?

Maintenance tasks

The manager must support custom maintenance tasks. They will be provided by the manager plugins.

Because the plugin must run in the real composer environment (class loader), we need contao-api as a standalone application, which loads the plugins and asks for tasks (new interface).

Update logo

Update manager to use the flattened Contao logo

Don't loose state on login timeout

If the login is timed out, the current application state is lost and the user is redirected to the login form. A possible solution would be to implement re-login in a popup.

low priority

Allow the user to choose a version of a package

A user should get a list of package versions (similar to the selection in the Contao 3 Composer client).

There should be two options:

  1. install version x.y.z and all future maintenance updates
  2. install version x.y.z and all future minor updates

The resulting constraint would be

  1. ~x.y.z
  2. ^x.y.z

This will prevent Composer from downgrading packages, but allows to upgrade according to selection.

More compact list view

Here is a mockup for a more compact list view, because the current view takes up a lot of height and requires a lot of scrolling. Also, most packages will never have an image, so I have removed the grey placeholder icon.

bildschirmfoto 2017-01-24 um 13 29 26

Obviously, this is not a top priority change.

Fix navigation

When I want to remove the "configuration" item (as it does not exist yet) the menu is off. Also, try editing a file, can we make the sub navigation items overlap codemirror? :D I tried z-index but this alone is not going to fix it :)

Catch memory limit issues

The task queue must check the log file of tasks marked as "running" if the process has died due to memory limit issues.

Login nicht möglich (Authentication credentials could not be found)

Wir testen zum Spaß mal gerade den Contao Manager. Gebaut habe ich das Phar nach den Anweisungen aus dem kürzlichen Commit von @discordier.

Das Phar läuft prinzipiell (sieht übrigens sehr hübsch aus!) und möchte gerne einen Benutzernamen und ein Passwort haben. Danach werden fünf Requests gestartet:

  • get_state
  • autoconfig
  • configure
  • create-project
  • run

Und der fünfte schlägt fehl (mit Code 401):
{"status":"ERROR","message":"Authentication credentials could not be found."}

In der tenside.json sieht es prinzipiell gut aus (würde ich sagen):

{
    "secret": "359f0344c5f9cbbec9a233bae6a6ca669790ead6084325fde84ace2ce7637988676e1c94de2646c0",
    "php_cli": "/opt/remi/php71/root/usr/bin/php",
    "php_cli_arguments": [
        "-d memory_limit=2G"
    ],
    "php_can_fork": true,
    "auth-password": {
        "admin": {
            "acl": 15,
            "salt": "589d87c3ecaf21.72196327",
            "username": "admin",
            "password": "$2y$13$UozWiuLBbaMmYyNdRSRpUOobQYWYNHVL8OSVe6wIRAJ2xmWey3k4u"
        }
    }
}

Das kann man beliebig oft wiederholen (wenn man den tenside-Ordner zwischendurch löscht). Was könnte der Grund sein?

Self test on installation

Installation must run the self test (probably already does). It must also be possible to access the selftest results from installl screen.

Center task popup on screen

Problem: When scrolling down the packages list and applying changes, the task popup is outside of the visible area.

Install Contao from ZIP file

It would be way easier to install Contao from a ZIP file instead of composer create-project. Should be sufficient to install a managed edition if that is the default download.

In that case we also don't need contao/managed-edition on Packagist.

Btw. this is similar to what the Symfony installer and the Contao check does.

Composer seems not finding the right php version when using MAMP

Hi everyone,

I got Contao installed in MAMP Pro host with php 5.5.23 in OS X 10.9
Packager suggests me to replace deprecated discordier/httpextendrequest by guzzlehttp//guzzle. But when I try, I got this message :

/usr/bin/env php -d memory_limit=1G -d max_execution_time=3000 composer.phar update --no-ansi --no-interaction -v
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 guzzlehttp/guzzle >=6.1.1.0,<6.2-dev -> satisfiable by guzzlehttp/guzzle[6.1.1].
    - guzzlehttp/guzzle 6.1.1 requires php >=5.5.0 -> your PHP version (5.4.45) does not satisfy that requirement.

I suppose Composer is verifying MAC OS X version of php instead of MAMP one.

Production build issues react warning

When building via gulp --production the following is logged in the console, we should fix this before final release.

bundle.js:20 Warning: It looks like you're using a minified copy of the development build of React. When deploying React apps to production, make sure to use the production build which skips development warnings and is faster. See https://fb.me/react-minification for more details.

Don't use CSS classes on <body>

As the react needs to render IN some given node, I can ask it to render on document.body but cannot adjust the CSS class of <body> itself to go for something like <body class="wide">.
Can we maybe have something like

<body>
    <div id="app" class="wide">
    <!-- everything goes in here -->
    </div>
</body>

? :-)

Allow to install LTS

The install screen should have a dropdown for either latest version or LTS version.

Rework/validate icons

The license for the icons needs to be validated and some icons might need to be changed.

Build doesn't work

I got an "404 - File /web/index.html Not Found" if I run the generated phar file on my webspace.

Fix the search bar

The search input field and type choice go together, so I wrapped them into the <section class="search">. Needs some margin adjustments.

Check for highlighted keywords CSS

I've implemented highlighting the search terms in package name and description in 2f07800 and used <mark> for this. Chrome apparently highlights this in yellow already but maybe we should make sure it's present in our CSS anyway?

Document "forgot password"

The password can currently be reset by deleting the users.json file in the contao-manager directory. We should add a topic about that to the Contao Manager manual.

Shebang prevents execution

The bundle.js gets a shebang (contao-manager.phar is used) so it's throwing an js syntax error.
Also the contao-manager.phar generates html that has a shebang on beginning which results in faulty html.

GitHub API Token

We need to think about whether it must be possible to enter a GitHub Token

Installation is running with dev requirements

The create-project task is not running with --no-dev, and I could not figure out why. The task in tenside/core seems to have this flag, but the task console says with require-dev.

Suggested packages

Allow the user to install suggested packages even if they are not of type contao-bundle. Probably provide a screen with suggestions.

Make PHAR work

The phar compilation currently does not work, and is not documented.

  1. Make sure the phar works exactly the same as the without phar
  2. Write a documentation (e.g. PHAR.md in root) how to compile the application

The Phar does not need to be optimized for now (e.g. #20)

Optimize font overhead (1/3 code vs. 2/3 fonts is not acceptable)

We currently have a compiled phar size of 3MB (on my side with some more optimizations like getting rid of some unneeded classes).
Of these 3MB, 2MB result from the src/Resources/public/fonts directory.

Personally, I feel it is way too heavy to have two third of the whole application consisting only of font data.
We therefore should either use another font or get rid of the unused character sets/font weights.

Manager Version

The version is currently hardcoded in JSX templates. Should be some sort of constant or thelike.

Fix gulp run on travis

Travis builds currently fail with a strict violation.

/home/travis/build/contao/package-manager/gulpfile.js:3
const browserify    = require('browserify');
^^^^^
SyntaxError: Use of const in strict mode.
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Liftoff.handleArguments (/home/travis/build/contao/package-manager/node_modules/gulp/bin/gulp.js:116:3)
    at Liftoff.<anonymous> (/home/travis/build/contao/package-manager/node_modules/gulp/node_modules/liftoff/index.js:193:16)
    at module.exports (/home/travis/build/contao/package-manager/node_modules/gulp/node_modules/liftoff/node_modules/flagged-respawn/index.js:17:3)
    at Liftoff.<anonymous> (/home/travis/build/contao/package-manager/node_modules/gulp/node_modules/liftoff/index.js:185:9)

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.