Skip to content
#

PHP

php logo

PHP is a popular general-purpose scripting language that's particularly suited for server-side web development. PHP runtime is generally executed by webpage content, and can be added to HTML and HTML5 webpages. PHP was originally developed in 1994 by Rasmus Lerdorf.

Here are 59,211 public repositories matching this topic...

symfony
steevanb
steevanb commented Sep 27, 2019

Description
When we want to configure an option in OptionsResolver, we have a code like this one:

$optionsResolver
    ->setDefined('foo')
    ->setAllowedTypes('foo', ['string'])
    ->setAllowedValues('foo', ['bar', 'baz'])
    ->setRequired('foo');

We have to duplicate option name and call 4 or 5 methods for each option to configure.

With only one option, it's reada

naderman
naderman commented Nov 27, 2019

Users often execute composer install with a different version of PHP than the version they execute the resulting code with. This can of course lead to problems and it would help if the generated autoloader verified a compatible PHP version is actually used. This is based on the idea implemented in flex: symfony/flex#576

Using either https://github.com/composer/semver/iss

wangch7
wangch7 commented May 22, 2019

Problem Description: No instruction of how to contribute in readme.rst. First time users will probably want to see information of how to contribute (which includes how to set up environment, communicate, and submit changes, etc.).

Solution Description: Add a contributing section in readme.rst with general contributing information, and include a link to file "contributing.md" (https://github.com

phpunit
oliverklee
oliverklee commented Sep 6, 2019
Q A
PHPUnit version master, 8.3 branch
PHP version 7.3.8 from MAMP
Installation Method Git

Running all tests using this command (as explained in tests/README.md works fine (i.e., no failures or errors):

./phpunit --testdox --colors=always --verbose

However, if I run the basic tests only

PHPMailer
Synchro
Synchro commented Jun 27, 2018

We often get questions asked on Stack Overflow about sending mail and returning the response as JSON to a javascript function, including meaningful errors. For the experienced, it's easy to see how to separate these things into its separate parts, but it's hard for beginners, so we could do with an example they can use as a reference.

I'd recommend starting with one of the existing examples (su

bologer
bologer commented Apr 3, 2019

I suggest to give brief intro to docs (somewhere here) about how to convert default ActiveController behaviour of "just models" into something like this:

{
  "items": [],
  "_links": {
    "self": {
      "href": "http://localhost/v1/test/index?page=1"
    }
  },
  "_meta": {
    "totalCount": 10,
Findus23
Findus23 commented Aug 18, 2019

I am a bit confused by the usage of shell_exec in Matomo and can't find any docs for it.

  • https://matomo.org/docs/requirements/ doesn't mention that it is required
  • In the few places I checked there is often a if (!function_exists('shell_exec')) { indicating that is only recommended, but not required
  • There are no docs explaining what Matomo needs shell_exec for (or even what it is and
pamtbaau
pamtbaau commented Dec 18, 2019

When creating a page 'changelog' as follows:

pages
├── 01.home
│   └── default.md
└── 02.changelog
    └── default.md

with the following route alias in the header to add the '.md' extension:

routes:
  aliases:
    - '/changelog.md'

And when accessing the page using the url localhost/changelog.md, a 'Forbidden' error will be thrown.

When the file 'CHANGELOG.md' in

Surt
Surt commented Nov 21, 2019

When executing getMimeType of an m3u8 file 'text/plain' is returned.

The correct mimetype should be 'application/x-mpegURL' can it be corrected?

Maybe adding text/plain to the "not so sure" in_array check.

// League\Flysystem\Adapter\Local.php:322  getMimetype
if (in_array($mimetype, ['application/octet-stream', 'inode/x-empty', 'application/x-empty'])) {
rentalhost
rentalhost commented Dec 9, 2019

Currently the first parameter $base is a string that could be: top-left (default), bottom-right or transparent as the doc: trim().

There some way to trim by color? In my case, I need trim transparent and/or white color, only. Eg.: trim([ 'transparent', 'white', '#FF0000']) to trim transparent, white and red. The problem is that first parameter

cphalcon
Nialld
Nialld commented Jan 22, 2020

Describe the bug
Model with a field called "container" will throw an exception on serialize

To Reproduce

CREATE TABLE test (
id int(10) unsigned NOT NULL AUTO_INCREMENT,
container varchar(64) DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB

and use phalcon dev tools to create a model of this table

create an instance of the model and serialize

im seeing erro

server
Skip75
Skip75 commented Jan 22, 2020

Actual behaviour

Getting reppeatedly below errors in log :


{
  "reqId": "qStsHNXpUsBjPWyODopP",
  "level": 3,
  "time": "2020-01-22T00:07:28+01:00",
  "remoteAddr": "",
  "user": "--",
  "app": "PHP",
  "method": "",
  "url": "--",
  "message": "Trying to access array offset on value of type bool at /var/www/nextcloud/apps/files_versions/lib/Storage.php#654",
  "userAgent":
october
monica
kotnik
kotnik commented Oct 8, 2019

Describe the bug

I visit /journal and little contact images are missing. Contacts have working avatars, changing them does not make them appear in Journal. Images from /journal/entries where the frontend is fetching entries from are just fine, I can open object.attendees[].avatar.url in browser just fine.

Screenshots

**Wh

mikehaertl
mikehaertl commented Oct 30, 2019

When learning how to use mocker I came across this paragraph on this page:

When creating a test double object, we can pass in an identifier as a name for our test double. If we pass it no identifier, the test double name will be unknown. Furthermore, the identifier must not be a class name. It i

Created by Rasmus Lerdorf

Released June 8, 1995

Organization
php
Website
secure.php.net
Wikipedia
Wikipedia

Related Topics

language database mysql
You can’t perform that action at this time.