Skip to content

Commit

Permalink
Merge pull request #1 from composer/master
Browse files Browse the repository at this point in the history
update from upstream
  • Loading branch information
Jirka Hrazdil authored Mar 16, 2020
2 parents a3751aa + b2f76df commit b5d1a2b
Show file tree
Hide file tree
Showing 62 changed files with 3,861 additions and 2,109 deletions.
7 changes: 6 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# ignore everything
*

# unignored directories
!bin
!docs
!res
!src
!views

# unignored files
!composer.json
!composer.lock
!LICENSE
!php-cli.ini
13 changes: 13 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,16 @@
# See core.whitespace @ http://git-scm.com/docs/git-config for whitespace flags.
*.php text eol=lf whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent,tabwidth=4 diff=php
*.json text eol=lf whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent,tabwidth=4

# Exclude these files from git export.
# This will effect when package is installed via --prefer-dist
/*.dist export-ignore
/.*.dist export-ignore
/.*.yml export-ignore
/.dockerignore export-ignore
/.git* export-ignore
/Dockerfile export-ignore
/box.json export-ignore
/docs/ export-ignore
/tests/ export-ignore
/webpack.config.js export-ignore
76 changes: 76 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
11 changes: 11 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Contributing to Satis

:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:

This project is released with a <a href="http://contributor-covenant.org/version/1/4/">Contributor Code of Conduct</a>. By participating in this project you agree to abide by its terms.

## How to contribute?

1. Fork the project,
2. create a feature branch,
3. and send us a pull request.
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

custom: https://packagist.com
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Provide configuration file(s) and the exact command that you invoked.

**Outcome**
If applicable, please provide detailed verbose output (`-vvv`) of the command.

**Expected behavior**
A clear and concise description of what you expected to happen.

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: feature
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/other.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
name: Question or general feedback
about: Not a bug or feature request? Let us hear your thoughts.
title: ''
labels: ''
assignees: ''

---
5 changes: 5 additions & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Security Policy

## Reporting a Vulnerability

Please e-mail any vulnerability related discoveries, feedback or otherwise to [email protected]. In case of sensitive content, my PGP key can be found on https://robbast.nl
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/build/
/node_modules/
/vendor/
/.php_cs.cache
/.phpunit.result.cache
/composer.phar
/phpunit.xml
/satis.phar
1 change: 1 addition & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ return (new PhpCsFixer\Config('satis'))
// additionally
'array_syntax' => ['syntax' => 'short'],
'concat_space' => false,
'declare_strict_types' => true,
'header_comment' => ['header' => $header],
'no_unused_imports' => false,
'no_useless_else' => true,
Expand Down
32 changes: 20 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,39 @@
sudo: false
dist: trusty

language: php

dist: bionic

cache:
directories:
- $HOME/.composer/cache/files
- $HOME/.composer
- vendor

git:
depth: 5

php:
- 7.0
- 7.1
- 7.2
- nightly
- 7.2
- 7.3
- 7.4
- nightly

env:
matrix:
- COMPOSER_FLAGS="--prefer-lowest"
- COMPOSER_FLAGS=""

matrix:
fast_finish: true
allow_failures:
- php: nightly
- php: nightly

before_install:
- flags="--no-interaction --no-progress --prefer-dist"
- travis_retry composer self-update --no-interaction

install:
- composer install $flags
- travis_retry composer update --no-interaction --no-progress --no-suggest --prefer-dist $COMPOSER_FLAGS

script:
- vendor/bin/phpunit
- vendor/bin/phpunit --coverage-text --coverage-clover coverage.xml

after_success:
- bash <(curl -s https://codecov.io/bash)
67 changes: 32 additions & 35 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,47 +1,44 @@
FROM php:7-alpine
FROM composer:1 AS build

MAINTAINER https://github.com/composer/satis
WORKDIR /satis

RUN apk --no-cache add curl git subversion mercurial openssh openssl tini zlib-dev
COPY . /satis/

RUN docker-php-ext-install zip \
&& echo "memory_limit=-1" > "$PHP_INI_DIR/conf.d/memory-limit.ini" \
&& echo "date.timezone=${PHP_TIMEZONE:-UTC}" > "$PHP_INI_DIR/conf.d/date_timezone.ini"
RUN set -eux; \
composer install \
--no-interaction \
--no-ansi \
--no-scripts \
--no-plugins \
--no-dev \
--prefer-dist \
--no-progress \
--no-suggest \
--classmap-authoritative

ENV COMPOSER_HOME /composer
ENV PATH "/composer/vendor/bin:$PATH"
ENV COMPOSER_ALLOW_SUPERUSER 1

RUN mkdir /build \
&& mkdir /composer \
&& chmod -R 777 /composer \
&& curl -sfLo /tmp/composer-setup.php https://getcomposer.org/installer \
&& curl -sfLo /tmp/composer-setup.sig https://composer.github.io/installer.sig \
&& php -r " \
\$hash = hash('SHA384', file_get_contents('/tmp/composer-setup.php')); \
\$signature = trim(file_get_contents('/tmp/composer-setup.sig')); \
if (!hash_equals(\$signature, \$hash)) { \
unlink('/tmp/composer-setup.php'); \
echo 'Integrity check failed, installer is either corrupt or worse.' . PHP_EOL; \
exit(1); \
}" \
&& php /tmp/composer-setup.php --no-ansi --install-dir=/usr/bin --filename=composer \
&& composer --no-interaction --no-ansi --version \
&& rm /tmp/composer-setup.php
FROM php:7-cli-alpine

WORKDIR /satis
MAINTAINER https://github.com/composer/satis

COPY ["composer.json", "composer.lock", "/satis/"]
RUN set -eux; \
apk add --no-cache --upgrade \
bash \
curl \
git \
subversion \
mercurial \
openssh \
openssl \
zip \
unzip

RUN composer install --no-interaction --no-ansi --no-autoloader --no-scripts --no-plugins --no-dev
ENV COMPOSER_HOME /composer

COPY bin /satis/bin/
COPY res /satis/res/
COPY views /satis/views/
COPY src /satis/src/
COPY php-cli.ini /usr/local/etc/php/
COPY --from=build /satis /satis/

RUN composer dump-autoload --no-interaction --no-ansi --optimize --no-dev
WORKDIR /build

ENTRYPOINT ["/sbin/tini", "-g", "--", "/satis/bin/docker-entrypoint.sh"]
ENTRYPOINT ["/satis/bin/docker-entrypoint.sh"]

CMD ["--ansi", "-vvv", "build", "/build/satis.json", "/build/output"]
Loading

0 comments on commit b5d1a2b

Please sign in to comment.