Coder Social home page Coder Social logo

joomla / framework.joomla.org Goto Github PK

View Code? Open in Web Editor NEW
34.0 34.0 30.0 11.67 MB

Application powering the internet home of the Joomla! Framework

Home Page: https://framework.joomla.org

License: GNU General Public License v2.0

PHP 78.00% HTML 0.02% JavaScript 0.33% SCSS 5.11% Twig 16.54%
application joomla php

framework.joomla.org's People

Contributors

brianteeman avatar dependabot[bot] avatar dgrammatiko avatar dongilbert avatar greenkeeper[bot] avatar greenkeeperio-bot avatar hackwar avatar joomla-dependency-bot avatar mbabker avatar nibra avatar rdeutz avatar sandra97 avatar wilsonge avatar zero-24 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

Watchers

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

framework.joomla.org's Issues

[RFC] Adopt stricter MySQL sql_mode?

in Joomla 4.0 we used a strict sql mode
https://github.com/joomla/joomla-cms/pull/12494/files

This was reverted when joomla 4.0 was updated to use the framework database package.

As we know MySql is becoming stricter as the other database systems (postgresql, Mssql) already are.

Example:

In MySQL 5.7.4, the ERROR_FOR_DIVISION_BY_ZERO, NO_ZERO_DATE, and NO_ZERO_IN_DATE SQL modes were changed so that they did nothing when named explicitly. Instead, their effects were included in the effects of strict SQL mode (STRICT_ALL_TABLES or STRICT_TRANS_TABLES). The intent was to reduce the number of SQL modes with an effect dependent on strict mode and make them part of strict mode itself.

However, the change to make strict mode more strict by including ERROR_FOR_DIVISION_BY_ZERO, NO_ZERO_DATE, and NO_ZERO_IN_DATE caused some problems. For example, in MySQL 5.6 with strict mode but not NO_ZERO_DATE enabled, TIMESTAMP columns can be defined with DEFAULT '0000-00-00 00:00:00'. In MySQL 5.7.4 with the same mode settings, strict mode includes the effect of NO_ZERO_DATE and TIMESTAMP columns cannot be defined with DEFAULT '0000-00-00 00:00:00'. This causes replication of CREATE TABLE statements from 5.6 to 5.7.4 to fail if they contain such TIMESTAMP columns.

The long term plan is still to have the three affected modes be included in strict SQL mode and to remove them as explicit modes in a future MySQL release. But to restore compatibility in MySQL 5.7 with MySQL 5.6 strict mode and to provide additional time for affected applications to be modified, the following changes have been made:
[...]

See https://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-8.html#mysqld-5-7-8-sql-mode

Also see discussion in joomla/joomla-cms#16788

Run vendor/bin/phinx migrate to set up the database - not working

According to the installation guide the setup is not working!

Installation:
Step 4: Run vendor/bin/phinx migrate to set up the database

Error: Call to undefined method Phinx\Db\Adapter\TimedOutputAdapter::getAdapterTableName()

there is no method getAdapterTableName() in Phinx\Db\Adapter\TimedOutputAdapter!

So database setup is not working!

[FW v2] Documentation Support

Presumably we'll have at least the skeletons and upgrade guides for each of the 40 packages when we tag v2 of the Framework. We'll want a plan to pull that documentation into the website itself versus having people navigate GitHub to find it. And that creates a bit of an issue as we're working with a lot of repositories.

Laravel uses a single documentation repository and it looks like that repo is cloned onto the live server and the files directly served from there. That's kind of where my inspiration comes from, but we'll need a bit more automation involved as I don't think it would be a good idea to have 40 git repos on our live server just to get one directory's contents.

We need to deal with 2 things as it relates to actually getting the markdown files:

  • Initial seeding (for when the feature is deployed or if someone were to clone this repo and were to get an environment set up in full)
  • Content updates

GitHub's API has resources to get individual files, but no way to get all files in a directory, so for initial seeding we either need to parse the API and extract all the docs folder stuff or pull down the ZIP of the repo and extract the docs. That last one probably is better as it should involve using public URLs. As for the content updates part, this one will be dependent on our update plan. If we're keeping the docs in sync with tagged releases, our CI system can automate refreshing the markdown files, but if they stay in sync with the repo main branch we'd probably need to set up a webhook to receive notifications on commits to the branch.

The markdown files get stored to a static directory on the server (add a config key for this) and the filesystem here should match the URLs we're setting up so the lookups are pretty easy.

Next part, reading the content into the site and displaying it to users.

For routing, we can use something like /docs/<major_version>/<package>/<slug> where the slug is the path to the file relative to the docs folder without the .md file extension, so https://github.com/joomla-framework/http/blob/2.0-dev/docs/overview.md turns into https://framework.joomla.org/docs/2.0/http/overview. We have to have versions in play now so when it's time to push a new major release we can serve the docs for multiple versions in an easy way.

We don't need to store the content in the database, but we will need to render it into HTML. So, similar to Laravel, the controller handling this request calls a service that gets the right HTML for the page's sections (more on that in a moment), the service stores the converted HTML into a cache engine, and we just echo out that Markdown parsed HTML. Probably can use GitHub's API for the markdown parser, but we can also look at a PHP engine if desired. One thing that will definitely need attention is links within the docs to make sure we keep those on site.

The docs area will need a few elements. The main page content has a sidebar with the package index and the body content for the active page. The sidebar comes from the package's index.md file (i.e. https://github.com/joomla-framework/http/blob/2.0-dev/docs/index.md). We'll also want to have navigation to get to the docs for every package, so the sidebar could possibly be a list of all of the packages and the package with the active docs can be expanded out a bit more. Again, take a look at Laravel's docs for an idea.

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because we are using your CI build statuses to figure out when to notify you about breaking changes.

Since we did not receive a CI status on the greenkeeper/initial branch, we assume that you still need to configure it.

If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you don’t want it to run on every branch, you can whitelist branches starting with greenkeeper/.

We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

Once you have installed CI on this repository, you’ll need to re-trigger Greenkeeper’s initial Pull Request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper integration’s white list on Github. You'll find this list on your repo or organiszation’s settings page, under Installed GitHub Apps.

phinx issue

Hello, setup of the database becomes a errore.

If run this command (php vendor/bin/phinx migrate) return this error:

Phinx by Rob Morgan - https://phinx.org. 0.8.0

using config file .phinx.php

  [RuntimeException]                                   
  Configuration file does not exist or is unreadable.  
                                                       

migrate [-c|--configuration CONFIGURATION] [-p|--parser PARSER] [-e|--environment ENVIRONMENT] [-t|--target TARGET] [-d|--date DATE]

If change the line number 27 in vendor/bin/phinx for find the file phinx.php in the root of the project

$app = require __DIR__ . '/../app/phinx.php';

to

$app = require '/phinx.php';

return this error:

www/joomla/phinx.php:13
Stack trace:
#0 /home/morpheus/www/jomla/vendor/robmorgan/phinx/bin/phinx(27): require()
#1 {main}
  thrown in /www/jomla/phinx.php on line 13

Can you tell me where I'm wrong or how do I migrate?

Thanks in advance.

Fix HTTP/2 Preload

Missing the as attribute in the Link header for preload assets. As is the implementation lacks a way to define this.

Essentially need the same changes as in mbabker/michaels.website@4a70d87 (yes I'm aware this links to a private repo, for those lurking this repo's issues 😉).

Add PSR badges

The Framework v2 packages support various PSRs:

  • Cache (PSR-6)
  • DI (PSR-11)
  • HTTP (PSR-7)

When rolling out v2 stable, integrate support for a badge on the status and package pages showing which PSRs are supported.

Sample Data

Create a sample data set that can be loaded into an installation to help possible contributors clone an instance of the site and have a usable platform.

Wrong paths when running in subfolder

Running the app on Windows in a subfolder results in that subfolder being added twice to at least the assets. Couldn't yet find out why that is, but it looks a bit like a misconfiguration when starting up the application.

Restructure Data Storage

The data storage for the app right now is a bit "goofy"

  • #__packages database table which holds a list of all of the package releases
  • #__test_results database table which holds the unit testing report for each release tag
  • The packages.yml file in the repo which holds various metadata about the packages
  • Change deltas for test coverage as shown on the individual package pages and included in the package API responses are calculated on the fly

It's time to rethink this a bit. At a minimum...

  • #__packages should become a #__releases table
  • packages.yml should be loaded into the database as a new #__packages table
  • The #__test_results table can either be merged to the proposed #__releases table or kept standalone and the FKs updated
  • Change deltas should be calculated once and included in the database records

Cannot run 'vendor/bin/phinx migrate'

When trying to run vendor/bin/phinx migrate, I'm getting the following error:

Parse error: syntax error, unexpected '{', expecting identifier (T_STRING) in \src\Service\ApplicationProvider.php on line 13

I tried separating all the use calls, so they don't use commas, and then received the following error:

Parse error: syntax error, unexpected ')', expecting variable (T_VARIABLE) in \src\Service\ApplicationProvider.php on line 200

Joomla updates will fail when spaces in temp path

As a follow up to joomla/joomla-cms#35684 I would like to place this issue here:

Steps to reproduce the issue

  • Set up a path with a space character in the $config->tmp_path variable (e.g. /Users/test/files/joomla projects/mysite/tmp)
  • Start a joomla update in the joomla backend

Expected result

The joomla update process should run through as normal (update from 3.9.27 to 3.10.2).

Actual result

Update could not be installed. Got an error The checksum verification failed. Please make sure you are using the correct update server!.

Reason for this error

In file libraries/vendor/joomla/filter/src/InputFilter.php in method cleanPath (line 1017) a regexp for checking the path for Linux or Windows file systems fails. For Linux systems the patters is defined as:

$linuxPattern = '/^[A-Za-z0-9_\/-]+[A-Za-z0-9_\.-]*([\\\\\/]+[A-Za-z0-9_-]+[A-Za-z0-9_\.-]*)*$/';

This pattern does not accept any spaces. Thus a tmp_path containing any spaces will fail.

Solution

The pattern should allow space, e.g.

$linuxPattern = '/^[A-Za-z0-9 _\/-]+[A-Za-z0-9 _\.-]*([\\\\\/]+[A-Za-z0-9 _-]+[A-Za-z0-9 _\.-]*)*$/';

Then the method cleanPath will return the correct path and the update process works as expected.

Additional comments

Tested/reproduced on Joomla! 3.9.27 trying to update to 3.10.2

[FW Site] Analytics is being double-loaded on framework.joomla.org

The problem

On framework.joomla.org it seems that Google Analytics is being loaded twice - once within Tag Manager and once as a separate Analytics tag.

Why we need to fix it

Unfortunately this causes some problems, and means that data in Analytics is inaccurate.

What we need you to help us with

We would be grateful if you could remove the tracking code being set outside of Google Tag Manager.

Please let us know when you make these changes, so we can add an annotation on Google Analytics!

Thanks in advance for your help with this, please don't hesitate to contact us should you need any assistance with any of the above.

Gruntfile for compiling assets

Do things the right way. Set up the asset compilation to use NPM/Grunt versus having everything checked into the repo and needing to use whatever random compiler is installed on someone's system.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

composer
composer.json
  • fig/link-util ^1.1
  • joomla/application ^2.0
  • joomla/console ^2.0
  • joomla/controller ^2.0
  • joomla/database ^2.0
  • joomla/di ^2.0
  • joomla/event ^2.0
  • joomla/filesystem ^2.0
  • joomla/filter ^2.0
  • joomla/github ^2.0@dev
  • joomla/http ^2.0
  • joomla/input ^2.0
  • joomla/model ^2.0
  • joomla/preload ^2.0
  • joomla/registry ^2.0
  • joomla/renderer ^2.0
  • joomla/router ^2.0
  • joomla/string ^2.0
  • joomla/uri ^2.0
  • joomla/utilities ^2.0
  • joomla/view ^2.0
  • laminas/laminas-diactoros ^2.3
  • monolog/monolog ^2.1
  • psr/link ^1.0
  • ramsey/uuid ^4.0.1
  • robmorgan/phinx ^0.14.0
  • symfony/asset ^5.1.2
  • symfony/process ^5.1.2
  • symfony/web-link ^5.1.2
  • symfony/yaml ^5.1.2
  • theiconic/php-ga-measurement-protocol ^2.7.2
  • twig/twig ^3.0
  • friendsofphp/php-cs-fixer ^3.13.2
  • squizlabs/php_codesniffer ~3.0
  • maximebf/debugbar ^1.16.3
npm
package.json
  • @fortawesome/fontawesome-free ^5.15.4
  • bootstrap ^4.6.1
  • smooth-scroll ^16.1.3
  • autoprefixer ^10.4.16
  • cross-env ^7.0.3
  • laravel-mix ^6.0.43
  • laravel-mix-purgecss ^6.0.0
  • resolve-url-loader ^5.0.0
  • sass ^1.51.0
  • sass-loader ^8.0.2
  • vue-template-compiler ^2.6.14
  • node >=16
  • npm >=8.5.5

Redo About Page

The about page is a list of contributors, not really an about section. Redo the about page in two parts:

  • Make a "real" about page (some of this is the current home page)
  • Make a contributors page which pulls data via GitHub API

Redo Package Dependencies and Status Section List

The status section list is derived from the Composer manifests which inherently means all packages have to be installed. Redo all of this so the list isn't dependent on the Composer data (GitHub API is a good option for a dynamic list, a static JSON or YAML file in the repo is another option).

PHP Version 7 not supported

I am having problems running the sample app on PHP Version 7 because of the Joomla/String/String class definition. It is accessed from the arrayhelper.php from the utilities package.

Automate Deployments

The new Jenkins CI system for joomla.org should be utilized to automate code deployments for this repository. To that, the following steps are required:

  • Remove compiled assets from this repository
    • Laravel Mix manifest
    • SRI manifest
    • CSS/JS
  • Adjust the live server to support a minimal downtime deployment workflow
    • New deployments directory
  • Create a job on the Jenkins system to deploy changes for the application
    • Package is extracted to deployments provisioning space
    • Add some kind of "maintenance mode" (./artisan down and ./artisan up thing) to deploy database schema changes as required
    • Change public_html to point to new deployment

NPM issues

Trying to run the first npm command in the readme


0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'prod' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'preprod', 'prod', 'postprod' ]
5 info lifecycle @~preprod: @
6 info lifecycle @~prod: @
7 verbose lifecycle @~prod: unsafe-perm in lifecycle true
8 verbose lifecycle @~prod: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\htdocs\framework.joomla.org\node_modules\.bin;C:\Python27\;C:\Python27\Scripts;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Broadcom\Broadcom 802.11 Network Adapter;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Lenovo\Bluetooth Software\;C:\Program Files\Lenovo\Bluetooth Software\syswow64;C:\Program Files\MySQL\MySQL Utilities 1.6\;C:\Program Files\Git\cmd;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\Skype\Phone\;C:\ProgramData\ComposerSetup\bin;C:\Program Files\nodejs\;C:\Program Files (x86)\PuTTY\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files (x86)\Gpg4win\..\GnuPG\bin;C:\Program Files\Microsoft VS Code\bin;C:\Users\brian\AppData\Local\Microsoft\WindowsApps;C:\php\7.2;C:\Program Files\MySQL\MySQL Server 5.7\bin;C:\Users\brian\AppData\Local\GitHubDesktop\bin;C:\Users\brian\AppData\Local\Microsoft\WindowsApps;C:\Users\brian\AppData\Roaming\Composer\vendor\bin;C:\Users\brian\AppData\Roaming\npm
9 verbose lifecycle @~prod: CWD: C:\htdocs\framework.joomla.org
10 silly lifecycle @~prod: Args: [ '/d /s /c',
10 silly lifecycle   'cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js' ]
11 silly lifecycle @~prod: Returned: code: 1  signal: null
12 info lifecycle @~prod: Failed to exec prod script
13 verbose stack Error: @ prod: `cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:304:16)
13 verbose stack     at EventEmitter.emit (events.js:182:13)
13 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:182:13)
13 verbose stack     at maybeClose (internal/child_process.js:961:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
14 verbose pkgid @
15 verbose cwd C:\htdocs\framework.joomla.org
16 verbose Windows_NT 10.0.17134
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "prod"
18 verbose node v10.4.0
19 verbose npm  v6.1.0
20 error code ELIFECYCLE
21 error errno 1
22 error @ prod: `cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
22 error Exit status 1
23 error Failed at the @ prod script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

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.