Skip to content

Document $suffix argument to tempnam() #12108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 903 commits into from
Feb 4, 2020
Merged

Document $suffix argument to tempnam() #12108

merged 903 commits into from
Feb 4, 2020

Conversation

jdufresne
Copy link
Contributor

No description provided.

Copy link
Contributor

@OskarStark OskarStark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it must be merged in 3.4, but we take care of it 👍🏻👌🏻

@OskarStark OskarStark added Filesystem Waiting Code Merge Docs for features pending to be merged labels Aug 7, 2019
@jdufresne
Copy link
Contributor Author

Thanks. I added the versionadded.

@OskarStark OskarStark added this to the 4.4 milestone Aug 16, 2019
@wouterj wouterj modified the milestones: 4.4, next Nov 24, 2019
javiereguiluz and others added 17 commits December 4, 2019 16:08
* 4.4:
  fix a typo in mailer docs (Mutliple -> Multiple)
…LanguageType (javiereguiluz)

This PR was squashed before being merged into the master branch (closes #12750).

Discussion
----------

[Form] Documented the choice_self_translation option of LanguageType

Fixes #12745.

Commits
-------

7361fdb [Form] Documented the choice_self_translation option of LanguageType
* 4.4:
  [Cache] Fixed a minor RST syntax issue
  [Cache] Expand the docs about the cache chain
  Explain the prefix used for expressions in YAML files
  Minor tweak in a security expression explanation
* 5.0:
  [Cache] Fixed a minor RST syntax issue
  [Cache] Expand the docs about the cache chain
  Explain the prefix used for expressions in YAML files
  Minor tweak in a security expression explanation
* 4.4:
  Revert "Removed 4.4 versionadded from the 4.3 docs"
  Removed 4.4 versionadded from the 4.3 docs
  Update setup.rst
  Update messenger.rst
* 5.0:
  Revert "Removed 4.4 versionadded from the 4.3 docs"
  Removed 4.4 versionadded from the 4.3 docs
  Update setup.rst
  Update messenger.rst
* 4.4:
  Updated a link to Debug component
  Remove ErrorRenderer reference everywhere
* 5.0:
  Updated a link to Debug component
  Remove ErrorRenderer reference everywhere
* 4.4:
  Updated the location of the errors.xml file
* 5.0:
  Updated the location of the errors.xml file
* 4.4:
  Minor tweaks
  Fix 12273 Added new ErrorController
* 5.0:
  Minor tweaks
  Fix 12273 Added new ErrorController
* 5.0:
  Removed 4.4 versionadded and deprecations
* 4.4:
  Mentioned the PHP 7.4 class preloading
  Scalingo is another PaaS which supports Symfony
OskarStark and others added 16 commits January 30, 2020 11:56
* 4.4:
  Minor
  Minor. refs #12949
  [Translation] Added tip about the incompatibility of % character
* 5.0:
  Minor
  Minor. refs #12949
  [Translation] Added tip about the incompatibility of % character
* 4.4:
  fix XML config example
* 5.0:
  fix XML config example
* 4.4:
  Promote usage of a single translation domain
  Move sidebar into a real section
  Removed Translation component documentation
* 5.0:
  Promote usage of a single translation domain
  Move sidebar into a real section
  Removed Translation component documentation
* 4.4:
  [#12861] Tweaked translation docs for 4.4 component changes
  [#12861] Tweak translation articles for 4.3 component changes
* 5.0:
  [#12861] Tweaked translation docs for 4.4 component changes
  [#12861] Tweak translation articles for 4.3 component changes
* 4.4:
  Removed leftover 3.4 versionadded directive
* 5.0:
  Removed leftover 3.4 versionadded directive
* 4.4:
  Added the other two removed component articles to the redirection map
* 5.0:
  Added the other two removed component articles to the redirection map
* 4.4:
  Fixed missing reference error
* 5.0:
  Fixed missing reference error
* 4.4:
  Fixed deadlink to Translation components docs
* 5.0:
  Fixed deadlink to Translation components docs
fabpot added a commit to symfony/symfony that referenced this pull request Feb 4, 2020
…sne)

This PR was submitted for the 4.4 branch but it was merged into the 5.1-dev branch instead (closes #33003).

Discussion
----------

[Filesystem] Add $suffix argument to tempnam()

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #33002
| License       | MIT
| Doc PR        | symfony/symfony-docs#12108

**Description**

The `tempnam()` interface was previously:

```php
tempnam($dir, $prefix)
```

This adds a third argument, `$suffix`, that is appended to the filename after the random component. This defaults to `''` for backwards compatibility. This is quite useful when the temporary file is consumed for a specific purpose that expects a suffix.

**Example**

```php
$filesystem->tempnam('/tmp', 'prefix_', '.png');
```

Would create a file like: `/tmp/prefix_abcd1234.png`.

Commits
-------

ef12069 [Filesystem] Add $suffix argument to tempnam()
@OskarStark OskarStark modified the milestones: next, 5.1 Feb 4, 2020
@OskarStark OskarStark removed the Waiting Code Merge Docs for features pending to be merged label Feb 4, 2020
@OskarStark OskarStark changed the base branch from 4.4 to master February 4, 2020 08:24
@jdufresne jdufresne requested a review from xabbuh as a code owner February 4, 2020 08:24
@OskarStark
Copy link
Contributor

Thanks for your work on this new feature!

@OskarStark OskarStark closed this in 15aa422 Feb 4, 2020
OskarStark added a commit that referenced this pull request Feb 4, 2020
@OskarStark OskarStark merged commit 4647377 into symfony:master Feb 4, 2020
OskarStark added a commit that referenced this pull request Feb 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.