Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

Commit

Permalink
feat: upgraded package to support php v8 only (#38)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: dropping support for php8
  • Loading branch information
prisis committed Mar 12, 2021
1 parent 1e51e1e commit 3a12f8a
Show file tree
Hide file tree
Showing 67 changed files with 7,517 additions and 1,086 deletions.
13 changes: 0 additions & 13 deletions .changelog

This file was deleted.

86 changes: 86 additions & 0 deletions .docker/php/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
ARG NAMESPACE
ARG PHP_VERSION

FROM ${NAMESPACE}:${PHP_VERSION}-cli

RUN apt-get update && \
apt-get install -y \
apt-utils \
libxml2-dev \
curl \
zlib1g-dev \
libicu-dev \
git \
g++ \
unzip \
libzip-dev \
zip \
libtool \
make \
build-essential \
automake \
ca-certificates && \
apt-get autoremove -y && \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN docker-php-ext-install opcache bcmath zip pcntl intl

RUN docker-php-ext-configure zip

RUN { \
echo "short_open_tag=off"; \
echo "date.timezone=Europe/Berlin"; \
echo "opcache.max_accelerated_files=20000"; \
echo "realpath_cache_size=4096K"; \
echo "realpath_cache_ttl=600"; \
echo "error_reporting = E_ALL"; \
echo "display_startup_errors = On"; \
echo "ignore_repeated_errors = Off"; \
echo "ignore_repeated_source = Off"; \
echo "html_errors = On"; \
echo "display_errors = On"; \
echo "log_errors = On"; \
echo "error_log = /var/log/php/cli-error.log"; \
} > /usr/local/etc/php/php.ini

# set recommended PHP.ini settings
# see https://secure.php.net/manual/en/opcache.installation.php
RUN { \
echo 'opcache.memory_consumption=128'; \
echo 'opcache.interned_strings_buffer=8'; \
echo 'opcache.max_accelerated_files=4000'; \
echo 'opcache.revalidate_freq=2'; \
echo 'opcache.fast_shutdown=1'; \
echo 'opcache.enable_cli=1'; \
} > /usr/local/etc/php/conf.d/opcache-recommended.ini

ENV COMPOSER_ALLOW_SUPERUSER 1

RUN php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer && \
composer global require phploc/phploc ergebnis/composer-normalize

ARG INSTALL_XDEBUG
ARG XDEBUG_VERSION

RUN if [ ${INSTALL_XDEBUG} = true ]; then pecl install "xdebug-${XDEBUG_VERSION}" ;fi
RUN if [ ${INSTALL_XDEBUG} = true ]; then docker-php-ext-enable xdebug ;fi

RUN { \
echo 'xdebug.idekey=PHPSTORM'; \
echo 'xdebug.remote_port=9003'; \
echo 'xdebug.discover_client_host=true'; \
echo 'xdebug.client_host=host.docker.internal'; \
echo 'xdebug.start_with_request=yes'; \
echo 'xdebug.profiler_output_dir="/var/log/xdebug"'; \
echo 'xdebug.cli_color=1'; \
echo 'xdebug.mode=profile,develop,coverage'; \
echo 'xdebug.max_nesting_level=1000'; \
} > /usr/local/etc/php/conf.d/php-ext-xdebug.ini

RUN mkdir /var/log/php && touch /var/log/php/cli-error.log && chmod 0664 /var/log/php/cli-error.log

WORKDIR /var/www/package

ENV PATH="/root/.composer/vendor/bin:${PATH}"
ENV DOKCER_RUN=true
4 changes: 3 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@ indent_size = 4
trim_trailing_whitespace = true

[*.yml]
indent_style = space
indent_size = 2

[package.json]
indent_size = 2
35 changes: 21 additions & 14 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
* text=auto
*.php text eol=lf

tests export-ignore
.build/ export-ignore
.dependabot export-ignore
.docker export-ignore
.github/ export-ignore

.styleci.yml export-ignore
.php_cs export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.travis.yml export-ignore
phpstan.neon export-ignore
tests/ export-ignore

phpunit.xml.dist export-ignore

CHANGELOG.md export-ignore
CONTRIBUTING.md export-ignore
README.md export-ignore
CODE_OF_CONDUCT.md export-ignore
phpbench.json export-ignore
.changelog export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.nvmrc export-ignore
.php_cs export-ignore
.textlintrc export-ignore
.typo-ci.yml export-ignore
docker-compose.yml export-ignore
infection.json export-ignore
package.json export-ignore
package-lock.json export-ignore
phpstan.neon export-ignore
phpunit.xml export-ignore
psalm.xml export-ignore
psalm-baseline.xml export-ignore
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @renovate @prisis
131 changes: 131 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

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

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders 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, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at d.bannert@anolilab.de.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
at [https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
28 changes: 28 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Contributing

Narrowspark and Narrowspark packages are open source, community-driven projects.

If you'd like to contribute, please read the following documents:

* [Reviewing issues/pull requests][0]
* [Reporting a Bug][1]
* [Submitting a Patch][2]
* [Usage of Docker and Docker Compose][9]
* [Narrowspark Core Team][3]
* [Security Issues][4]
* [Running Narrowspark Tests][5]
* [Our Backwards Compatibility Promise][6]
* [Coding Standards][7]
* [Conventions][8]


[0]: https://narrowspark.com/docs/current/contributing/community/reviews
[1]: https://narrowspark.com/docs/current/contributing/code/bugs
[2]: https://narrowspark.com/docs/current/contributing/code/patches
[3]: https://narrowspark.com/docs/current/contributing/code/core_team
[4]: https://narrowspark.com/docs/current/contributing/code/security
[5]: https://narrowspark.com/docs/current/contributing/code/tests
[6]: https://narrowspark.com/docs/current/contributing/code/bc
[7]: https://narrowspark.com/docs/current/contributing/code/standards
[8]: https://narrowspark.com/docs/current/contributing/code/conventions
[9]: https://narrowspark.com/docs/current/contributing/docker
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github: prisis
open_collective: _prisis_
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/Bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: "\U0001F41B Bug Report"
about: "If something isn't working as expected \U0001F914."
labels: 'Type: Bug'
assignees: ''

---

<!--
The Code of Conduct (../CODE_OF_CONDUCT.md) applies to all the activity on this repository.
-->

**Version(s) affected**: x.y.z

**Description**
<!-- A clear and concise description of the problem / behavior. -->

**How to reproduce**
<!--- Code and/or config needed to reproduce the problem. -->

**Possible Solution**
<!-- Optional: only if you have suggestions on a fix/reason for the bug -->

**Additional context**
<!-- Optional: any other context about the problem: log messages, screenshots, etc. -->
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/Documentation_issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: 📚 Documentation Issue
about: Anything related to package documentation

---

<!--
The Code of Conduct (../CODE_OF_CONDUCT.md) applies to all the activity on this repository.
-->
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/Feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: "\U0001F680 Feature Request"
about: "I have a suggestion (and may want to implement it \U0001F642)!"
labels: 'Enhancement'
assignees: ''
---

<!--
The Code of Conduct (../CODE_OF_CONDUCT.md) applies to all the activity on this repository.
-->

**Is your feature request related to a problem? Please describe.**
<!-- A clear and concise description of what the problem is. Ex. I have an issue when [...] -->

**Describe the solution you'd like**
<!-- A clear and concise description of what you want to happen. Add any considered drawbacks. -->

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

**Teachability, Documentation, Adoption, Migration Strategy**
<!-- If you can, explain how users will be able to use this and possibly write out a version the docs. -->
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/Security_issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: ㊙️ Security Issue
about: Report security-related errors

---

<!--
The Code of Conduct (../CODE_OF_CONDUCT.md) applies to all the activity on this repository.
-->

⚠ PLEASE DON'T DISCLOSE SECURITY-RELATED ISSUES PUBLICLY, SEE BELOW.

If you have found a security issue in Narrowspark Http Emitter, please send the details to
security [at] narrowspark.com and don't disclose it publicly until we can provide a
fix for it.
Loading

0 comments on commit 3a12f8a

Please sign in to comment.