Skip to content

Commit 8cfd582

Browse files
committed
Merge branch 'develop' into 1.1
* develop: (25 commits) Support embedded data URIs in the list image column type Make some adjustments to the readme content Update banner in readme Add new GitHub banner Documentation with icons (#347) Limit options shown in group filter, apply scope when retrieving filtered options Add Exception on wrong relation type in relation formwidget (#334) Redesigned color picker widget (#324) Add winter:test command (#202) Use the correct backend timezone config key (#337) Get changelog only of the current branch Fix Markdown editor sizing issue on Chrome. Check overrides for parent locale when compiling language files (#242) Fixing commas in English translation files (#305) Added Latvian translations for Allowed IP messages (#304) Add missing filter translations (#303) Clean up newlines Update Russian language (#302) Fix issue present in overriding RelationController partials using the default code Maintenance Allowed IP list (#147) ...
2 parents 405af85 + bd343c3 commit 8cfd582

File tree

108 files changed

+1911
-3725
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+1911
-3725
lines changed

.github/assets/Github Banner.png

500 KB
Loading

.gitpod.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
image:
2+
file: ./.gitpod/Dockerfile
3+
4+
tasks:
5+
- init: ./.gitpod/gitpod-init
6+
command: ./.gitpod/gitpod-cmd
7+
8+
ports:
9+
- port: 1025
10+
onOpen: ignore
11+
- port: 3306
12+
onOpen: ignore
13+
- port: 33060
14+
onOpen: ignore
15+
- port: 8000
16+
visibility: public
17+
onOpen: ignore
18+
- port: 8025
19+
onOpen: ignore
20+
- port: 9003
21+
onOpen: ignore
22+
23+
vscode:
24+
extensions:
25+
- felixfbecker.php-debug
26+
- bmewburn.vscode-intelephense-client
27+
28+
github:
29+
prebuilds:
30+
master: true
31+
branches: false
32+
pullRequests: true
33+
pullRequestsFromForks: false
34+
addCheck: true
35+
addComment: false
36+
addBadge: true

.gitpod/Dockerfile

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
FROM gitpod/workspace-mysql
2+
3+
# Install XDebug extension
4+
RUN sudo apt-get update -q \
5+
&& sudo apt-get install -y \
6+
php-dev \
7+
golang-go \
8+
&& sudo pecl install xdebug
9+
10+
# Install Composer 2 (Gitpod comes pre-installed with Composer 1) - borrowed from official Composer Docker image
11+
ENV COMPOSER_ALLOW_SUPERUSER 1
12+
ENV COMPOSER_HOME /tmp
13+
ENV COMPOSER_VERSION 2.1.6
14+
15+
RUN set -eux; \
16+
curl \
17+
--silent \
18+
--fail \
19+
--location \
20+
--retry 3 \
21+
--output /tmp/keys.dev.pub \
22+
--url https://raw.githubusercontent.com/composer/composer.github.io/e7f28b7200249f8e5bc912b42837d4598c74153a/snapshots.pub \
23+
; \
24+
php -r " \
25+
\$signature = '4ac45767e5ec22652f0c1167cbbb8a2b0c708369153e328cad90147dafe50952'; \
26+
\$hash = hash('sha256', preg_replace('{\s}', '', file_get_contents('/tmp/keys.dev.pub'))); \
27+
if (!hash_equals(\$signature, \$hash)) { \
28+
echo 'Integrity check failed, dev public key is either corrupt or worse.' . PHP_EOL; \
29+
exit(1); \
30+
}" \
31+
; \
32+
curl \
33+
--silent \
34+
--fail \
35+
--location \
36+
--retry 3 \
37+
--output /tmp/keys.tags.pub \
38+
--url https://raw.githubusercontent.com/composer/composer.github.io/e7f28b7200249f8e5bc912b42837d4598c74153a/releases.pub \
39+
; \
40+
php -r " \
41+
\$signature = '57815ba27e54dc317ecc7cc5573090d087719ba68f3bb7234e5d42d084a14642'; \
42+
\$hash = hash('sha256', preg_replace('{\s}', '', file_get_contents('/tmp/keys.tags.pub'))); \
43+
if (!hash_equals(\$signature, \$hash)) { \
44+
echo 'Integrity check failed, tags public key is either corrupt or worse.' . PHP_EOL; \
45+
exit(1); \
46+
}" \
47+
; \
48+
curl \
49+
--silent \
50+
--fail \
51+
--location \
52+
--retry 3 \
53+
--output /tmp/installer.php \
54+
--url https://raw.githubusercontent.com/composer/getcomposer.org/f24b8f860b95b52167f91bbd3e3a7bcafe043038/web/installer \
55+
; \
56+
php -r " \
57+
\$signature = '756890a4488ce9024fc62c56153228907f1545c228516cbf63f885e036d37e9a59d27d63f46af1d4d07ee0f76181c7d3'; \
58+
\$hash = hash('sha384', file_get_contents('/tmp/installer.php')); \
59+
if (!hash_equals(\$signature, \$hash)) { \
60+
echo 'Integrity check failed, installer is either corrupt or worse.' . PHP_EOL; \
61+
exit(1); \
62+
}" \
63+
; \
64+
sudo php /tmp/installer.php --no-ansi --install-dir=/usr/bin --filename=composer --version=${COMPOSER_VERSION}; \
65+
composer --ansi --version --no-interaction; \
66+
composer diagnose; \
67+
rm -f /tmp/installer.php; \
68+
sudo find /tmp -type d -exec chmod -v 1777 {} +
69+
70+
# Configure Xdebug
71+
RUN sudo bash -c "echo -e '\nzend_extension = /usr/lib/php/20190902/xdebug.so\n\n[XDebug]\nxdebug.mode=debug\nxdebug.start_with_request = 1\nxdebug.client_host = 127.0.0.1\n' >> /etc/php/7.4/cli/php.ini"

.gitpod/README.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Winter CMS on Gitpod
2+
3+
Winter CMS now supports the [Gitpod.io](https://gitpod.io) service to provide near-instant development and testing environments for Winter CMS.
4+
5+
This service allows you to check out the Winter CMS codebase at any commit, any branch or any pull request and be given a full Visual Studio Code environment that is completely configured and bootstrapped to run Winter CMS immediately.
6+
7+
Each instance contains the following:
8+
9+
- Winter CMS with the [DebugBar plugin](https://github.com/wintercms/wn-debugbar-plugin).
10+
- VSCode.
11+
- MySQL 5.7.
12+
- PHP 7.4 with all required extensions.
13+
- PHP Xdebug extension.
14+
- Composer 2.
15+
- [MailHog service](https://github.com/mailhog/MailHog/) for capturing emails.
16+
17+
To use this service, you will need an account on Gitpod - one can easily be created by using your GitHub login. You will receive 50 hours per month free for use on Gitpod, but can opt to increase your hours (or even get unlimited hours) by [purchasing a higher plan](https://www.gitpod.io/pricing) on Gitpod.
18+
19+
## Creating a Gitpod instance
20+
21+
There are several ways to create a Gitpod instance of Winter CMS:
22+
23+
- Use one of the **Open in Gitpod** button, which will be available in the README of Winter CMS, as well as any pull request submitted to Winter CMS.
24+
- Install the [Gitpod extension](https://www.gitpod.io/docs/browser-extension#browser-extension) for Chrome or Firefox, which provides a **Gitpod** button in GitHub.
25+
- Manually create an instance by copying a GitHub address within the Winter CMS repo, and prefixing the address with `https://gitpod.io/#/`
26+
27+
The Gitpod instance may take a minute or two to boot up if it has not been pre-built.
28+
29+
> **Note:** For brevity, Gitpod instances have the initial admin account set to **admin / admin** as the username and password to login. If you intend to share the URL, we recommend you change this password.
30+
31+
## Accessing the services
32+
33+
The Gitpod instance is set-up to boot all necessary services and then provides two web-facing services - the Winter CMS install itself, which is run on port 8000, and MailHog, which is run on port 8025.
34+
35+
You can click the **Ports** section in the status bar of VSCode, which will take you to the available ports, and click on one of these ports to view the actions for the port. The "globe" icon will open up a special URL which will access the service on that port. We automatically load up Winter CMS on boot in a new tab.
36+
37+
### MySQL
38+
39+
By default, MySQL only runs locally within the Gitpod instance, and cannot be connected to from the outside. However, you can use the [Gitpod Local Companion](https://www.gitpod.io/blog/local-app) service to tunnel into the running Gitpod instance and access its services on your own computer.
40+
41+
Install the app for your OS, then run `gitpod-local-companion-[darwin|linux|windows]` to set up the tunneling service. For MySQL, this will make the database available on port 3306 on your computer.
42+
43+
You can then connect to it using any MySQL management program of your choice.
44+
45+
## Config files
46+
47+
By default, the Winter CMS Gitpod instance will use `php artisan winter:env` to create an `.env` file that will contain your config. Because this command rewrites the main config files in the `config` directory, which will appear as changes in Git, we mark these files as "unwatched" in Git so that they are not committed to GitHub.
48+
49+
If you are editing a pull request that does contain config changes that you wish to include in the PR, you can use the `.gitpod/gitpod-show-config` helper script inside your Gitpod instance to make these files appear in the Git changes.
50+
51+
## Debugging
52+
53+
Debugging Winter CMS in Gitpod is super simple - all necessary setup has already been done! You can access the Debugging tab in VSCode and press start on the debugging tool to use breakpoints within your code. Note that Gitpod does impose a time limit on responses from the web server, so you may find that using the debugging will result in timeouts when viewing your Winter CMS instance, however, debugging should still continue without issue.

.gitpod/gitpod-cmd

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/bin/bash
2+
3+
# Create database
4+
gp await-port 3306 && mysql -e "DROP DATABASE IF EXISTS winter"
5+
mysql -e "CREATE DATABASE winter"
6+
7+
# Create environment file
8+
php artisan winter:env
9+
10+
# Hide config file changes from Git
11+
./.gitpod/gitpod-hide-config
12+
13+
# Exclude Debugbar files from Git
14+
echo -e "plugins/winter/debugbar\nstorage/debugbar" >> ./.git/info/exclude
15+
16+
# Rewrite configuration
17+
sed -i "s|APP_URL=.*$|APP_URL=${GITPOD_WORKSPACE_URL}|g" .env
18+
sed -i "s|APP_URL=https://|APP_URL=https://8000-|g" .env
19+
sed -i "s|APP_KEY=.*$|APP_KEY=$(cat /dev/urandom | base64 | head -c 32)|g" .env
20+
sed -i "s|DB_CONNECTION=.*$|DB_CONNECTION=mysql|g" .env
21+
sed -i "s|DB_HOST=.*$|DB_HOST=127.0.0.1|g" .env
22+
sed -i "s|DB_PORT=.*$|DB_PORT=3306|g" .env
23+
sed -i "s|DB_DATABASE=.*$|DB_DATABASE=winter|g" .env
24+
sed -i "s|DB_USERNAME=.*$|DB_USERNAME=root|g" .env
25+
sed -i "s|DB_PASSWORD=.*$|DB_PASSWORD=|g" .env
26+
sed -i "s|MAIL_DRIVER=.*$|MAIL_DRIVER=smtp|g" .env
27+
sed -i "s|MAIL_HOST=.*$|MAIL_HOST=127.0.0.1|g" .env
28+
sed -i "s|MAIL_PORT=.*$|MAIL_PORT=1025|g" .env
29+
sed -i "s|MAIL_ENCRYPTION=.*$|MAIL_ENCRYPTION=null|g" .env
30+
sed -i "s|MAIL_USERNAME=.*$|MAIL_USERNAME=null|g" .env
31+
sed -i "s|MAIL_PASSWORD=.*$|MAIL_PASSWORD=null|g" .env
32+
sed -i "s|'trustedProxies' => null|'trustedProxies' => '*'|g" config/app.php
33+
34+
# Run migrations
35+
php artisan winter:up
36+
37+
# Set admin password
38+
php artisan winter:passwd admin admin
39+
40+
# Run Mailhog in background
41+
/workspace/go/bin/MailHog >/dev/null 2>&1 &
42+
43+
# Serve site
44+
php artisan serve >/dev/null 2>&1 &
45+
gp await-port 8000 && gp preview --external $(gp url 8000)
46+
47+
# Open README
48+
gp open ./.gitpod/README.md

.gitpod/gitpod-hide-config

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
# Hide config file edits from Git changes
4+
git update-index --skip-worktree config/app.php
5+
git update-index --skip-worktree config/cache.php
6+
git update-index --skip-worktree config/cms.php
7+
git update-index --skip-worktree config/database.php
8+
git update-index --skip-worktree config/mail.php
9+
git update-index --skip-worktree config/queue.php
10+
git update-index --skip-worktree config/session.php

.gitpod/gitpod-init

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
# Install Mailhog
4+
go get github.com/mailhog/MailHog
5+
6+
# Add Debug Bar plugin
7+
composer require --no-update "winter/wn-debugbar-plugin" "4.0.0"
8+
9+
# Install Composer dependencies
10+
composer update --no-progress
11+
git reset --hard
12+
13+
# Setup VSCode config
14+
mkdir -p ./.vscode
15+
cp ./.gitpod/vscode-launch.json ./.vscode/launch.json

.gitpod/gitpod-show-config

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
# Hide config file edits from Git changes
4+
git update-index --no-skip-worktree config/app.php
5+
git update-index --no-skip-worktree config/cache.php
6+
git update-index --no-skip-worktree config/cms.php
7+
git update-index --no-skip-worktree config/database.php
8+
git update-index --no-skip-worktree config/mail.php
9+
git update-index --no-skip-worktree config/queue.php
10+
git update-index --no-skip-worktree config/session.php

.gitpod/vscode-launch.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Listen for Xdebug",
9+
"type": "php",
10+
"request": "launch",
11+
"port": 9003
12+
}
13+
]
14+
}

README.md

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,47 @@
11
<p align="center">
2-
<img src="https://github.com/wintercms/winter/raw/develop/modules/backend/assets/images/wordmark.png?raw=true" alt="Winter CMS Logo" width="100%" />
2+
<img src="https://github.com/wintercms/winter/raw/develop/.github/assets/Github%20Banner.png?raw=true" alt="Winter CMS Logo" width="100%" />
33
</p>
44

5-
[Winter](https://wintercms.com) is a Content Management System (CMS) and web platform whose sole purpose is to make your development workflow simple again. It was born out of frustration with existing systems. We feel building websites has become a convoluted and confusing process that leaves developers unsatisfied. We want to turn you around to the simpler side and get back to basics.
5+
[Winter](https://wintercms.com) is a free, open-source content management system based on the [Laravel](https://laravel.com) PHP framework. Developers and agencies all around the world rely upon Winter for its quick prototyping and development, safe and secure codebase and dedication to simplicity.
66

7-
Winter's mission is to show the world that web development is not rocket science.
7+
No matter how large or small your project is, Winter provides a rich development environment, regardless of your level of experience.
88

99
[![Version](https://img.shields.io/github/v/release/wintercms/winter?sort=semver&style=flat-square)](https://github.com/wintercms/winter/releases)
1010
[![Tests](https://img.shields.io/github/workflow/status/wintercms/winter/Tests/develop?label=tests&style=flat-square)](https://github.com/wintercms/winter/actions)
1111
[![License](https://img.shields.io/github/license/wintercms/winter?label=open%20source&style=flat-square)](https://packagist.org/packages/wintercms/winter)
1212
[![Discord](https://img.shields.io/discord/816852513684193281?label=discord&style=flat-square)](https://discord.gg/D5MFSPH6Ux)
1313

14+
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/wintercms/winter)
15+
1416
## Installing Winter
1517

16-
Instructions on how to install Winter can be found at the [installation guide](https://wintercms.com/docs/setup/installation).
18+
Winter can be installed in several ways for both new users and experienced developers - see our [Installation page](https://wintercms.com/install) for more information.
1719

18-
### Quick Start Installation
20+
### Quick start with Composer
1921

20-
For advanced users, run this in your terminal to install Winter from command line:
22+
For advanced users, run the following command in your terminal to install Winter via Composer:
2123

2224
```shell
2325
composer create-project wintercms/winter example.com "dev-develop"
2426
```
2527

26-
If you plan on using a database, run this command inside the application directory.
28+
Run the following command with the folder created by the previous command to generate an environment file which will contain your configuration settings:
2729

2830
```shell
29-
php artisan winter:install
31+
php artisan winter:env
3032
```
3133

32-
## Learning Winter
34+
After configuring your installation, you can run the following command to run the database migrations and automatically create an administrator account with the username `admin`. The password of this account will be automatically generated and displayed in your terminal.
35+
36+
```shell
37+
php artisan winter:up
38+
```
3339

34-
The best place to learn Winter is by [reading the documentation](https://wintercms.com/docs), [watching some screencasts](https://octobercms.com/support/topic/screencast) or [following some tutorials](https://octobercms.com/support/articles/tutorials).
40+
## Learning Winter
3541

36-
You may also watch these introductory videos for [beginners](https://vimeo.com/79963873) and [advanced users](https://vimeo.com/172202661).
42+
The best place to learn Winter is by [reading the documentation](https://wintercms.com/docs) or [following some tutorials](https://wintercms.com/blog/category/tutorials). You can also join the maintenance team and our active community on [Discord](https://discord.gg/D5MFSPH6Ux) who are always willing to help out with questions.
3743

38-
## Development Team
44+
## Development team
3945

4046
Winter was forked from October CMS in March 2021 due to a difference in open source management philosophies between the core maintainer team and the two founders of October.
4147

@@ -52,18 +58,18 @@ The development of Winter is lead by [Luke Towers](https://luketowers.ca/), alon
5258

5359
## Foundation library
5460

55-
The CMS is built on top of the wildly-popular [Laravel](https://laravel.com) PHP framework, with the in-house [Storm](https://github.com/wintercms/storm) Library as a buffer between the Laravel Framework and the CMS project to minimize breaking changes and improve stability.
61+
Winter is built on top of the wildly-popular [Laravel](https://laravel.com) framework for PHP, with the in-house [Storm](https://github.com/wintercms/storm) library as a buffer between the Laravel framework and the Winter project, to minimize breaking changes and improve stability.
5662

57-
## Contact
63+
## Getting in touch
5864

59-
You can communicate with us using the following mediums:
65+
You can get in touch with the maintainer team using the following mediums:
6066

6167
* [Follow us on Twitter](https://twitter.com/usewintercms) for announcements and updates.
6268
* [Join us on Discord](https://discord.gg/D5MFSPH6Ux) to chat with us.
6369

6470
## Contributing
6571

66-
Before sending or reviewing Pull Requests, be sure to review the [Contributing Guidelines](https://github.com/wintercms/.github/blob/master/CONTRIBUTING.md) first.
72+
Before contributing issues or pull requests, be sure to review the [Contributing Guidelines](https://github.com/wintercms/.github/blob/master/CONTRIBUTING.md) first.
6773

6874
### Coding standards
6975

@@ -73,14 +79,14 @@ Please follow the following guides and code standards:
7379
* [PSR 2 Coding Style Guide](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)
7480
* [PSR 1 Coding Standards](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md)
7581

76-
### Code of Conduct
82+
### Code of conduct
7783

78-
In order to ensure that the Winter CMS community is welcoming to all, please review and abide by the [Code of Conduct](https://github.com/wintercms/.github/blob/master/CODE_OF_CONDUCT.md).
84+
In order to ensure that the Winter community is welcoming to all, please review and abide by the [Code of Conduct](https://github.com/wintercms/.github/blob/master/CODE_OF_CONDUCT.md).
7985

8086
## License
8187

82-
The Winter CMS platform is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
88+
The Winter platform is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
8389

84-
## Security Vulnerabilities
90+
## Security vulnerabilities
8591

8692
Please review [our security policy](https://github.com/wintercms/winter/security/policy) on how to report security vulnerabilities.

0 commit comments

Comments
 (0)